Re:The origins of Objective-C at PPI/Stepstone and its evolu...
by cat199 on Monday June 15, 2020 @02:24PM
(#23531057)
reference counting is reference counting.
a reference counting gc is a form of garbage collection.
not sure what applies here, as am not versed in objc, but, the terms are distinct - in theory one can have an object system that refcounts objects so that they are not mis-deleted if some reference still exists and the object is accidentally deleted by some code, but still allow for mostly-manual memory management.
Re:The origins of Objective-C at PPI/Stepstone and its evolu...
by jolux on Monday June 15, 2020 @09:02PM
(#23534879)
We're discussing ARC here, i.e. Automatic Reference Counting, which is a garbage collection algorithm. Retain/release would be manual memory management by reference counting, which is not being discussed.
Re:The origins of Objective-C at PPI/Stepstone and its evolu...
by cmrdporcupine on Monday June 15, 2020 @10:31PM
(#23535406)
Even without ARC it's still garbage collection. The reference counts are kept for the purpose of managing garbage collection. That the programmer has to do some manual retain/release steps is beside the point, even if it does make the experience somewhat painful.
Malloc heuristics also mean that it is not true that everything is 100% deterministic at runtime. It's easy to forget that malloc is simply an abstraction like any other. When do free memory blocks get reshuffled between threads in a thread-caching malloc? When does unused memory get returned to the OS? These are all things that cannot be predicted. Even retain and release are not 100% deterministic, as they can and will be optimized away by the compiler.
[1]: https://www.memorymanagement.org/glossary/g.html#term-garbag...