4 ms·
Wikipedia describes GC as being automatic memory management. I don't think it is valid to describe the traditional (pre-2007) osx/objective-c model of manual re
by cturner 8y ago
Wikipedia describes GC as being automatic memory management. I don't think it is valid to describe the traditional (pre-2007) osx/objective-c model of manual reference counting as a form of garbage collection.
Darwin itself is mostly unix+C. Hence, this does not respond to the parent, asking about GC in the OS itself.
- Volt 8y ago>Darwin itself is mostly unix+C. Hence, this does not respond to the parent, asking about GC in the OS itself. You're right, but just to clarify WRT your first paragraph, Obj-C did briefly have a GC'd runtime between the eras of manual and automatic ref counting.
- cturner 8y agoAs you and neighbour inferred, I had not know of this. Thanks.
- pjmlp 8y agoObjective-C 2.0 got a tracing GC, which was later replaced by ARC, because it was a failure. Although it was possible to link frameworks compiled in mixed modes, it lead most of the time to crashs and the C semantics did not help. Hence the pragmatic solution of ARC, which basically has the compiler inserting the retain/release calls that used to be done manually. While not the same, it was a good enough solution. https://developer.apple.com/documentation/foundation/object_runtime/objective_c_garbage_collection?language=objc https://developer.apple.com/documentation/foundation/object_...