Re:Mac Apps That Use Garbage Collection Must Move to ARC
by danbruc on Saturday February 21, 2015 @12:55PM
(#9086210)
Reference counting does not provide any guarantees when objects get deallocated on its own either, any removed reference may make the counter zero and trigger a deallocation. It may of course be worse with a full blown garbage collector building up a huge pile of unused objects and then cleaning them up all at once. But that is not a necessary limitation, there are already garbage collectors performing the entire work in parallel with the normal application execution.
[ Parent
| on HN ]
Re:Mac Apps That Use Garbage Collection Must Move to ARC
by tjl on Saturday February 21, 2015 @04:31PM
(#9087050)
Objective-C uses pools, so deallocation doesn't happen automatically when the reference count hits zero. Apple's reference counting implementation is fairly smart.
Over on the Reddit discussion there was a comment from Ridiculous Fish who at least was an Apple developer (and probably still is) and worked on adding GC to the Cocoa frameworks,
http://www.reddit.com/r/programming/comments/2wo18p/mac_apps...
Basically, because of interop with C, there's only so much you can do. Plus, the tracing GC wasn't on iOS so if you want unified frameworks (for those that make sense cross-platform), supporting the tracing GC along with ARC is added work.