By "Automatic Reference Counting", I am refering to the specific feature of the Clang compiler. By "Garbage Collection", I am refering to Tracing Garbage Collection, not to "Garbage Collection" in general.
The main difference as I understand is that ARC gives you control over making optimizations if needed, while in a garbage collected system the software engineer doesn’t need (?) to consider memory management. Since it appears that ARC strikes more of a balance of control and abstraction, are there environments outside of Objective-C/Swift that implement something like this? Are there weaknesses to this model of memory management that I’m missing?
std::rc::Rc
andstd::arc::Arc
, and C++ hasstd::shared_ptr