Skip to content

Comment on Mountain Lion seems to have addressed the memory management issues in OS X

Comments

One of the things I've noticed is that the new Xcode 4.4 (released the same time as Mountain Lion) seems to be an awful lot snappier to me. My theory is that this is happening because they might have switched Xcode from being garbage collected to ARC (since it used to be GC ever since Snow Leopard came out but GC is now deprecated).

Does anyone know if there is a way to monitor xcode and find out if it's GC or ARC?

You can just use otool to dump the Objective-C information out of the MachO executable:

     otool -o /Applications/Xcode.app/Contents/MacOS/Xcode
     .....
     Contents of (__DATA,__objc_imageinfo) section
       version 0
         flags 0x6 OBJC_IMAGE_SUPPORTS_GC
That's for Xcode 4.4. So yes, it's still being built for Garbage Collection.

A recent post on the Apple developer forums indicated that it is still using gc. But it's a very large, old codebase at this point so that's not surprising.

I imagine that as they drop support for older platforms and have the time, they'll slowly remove reliance on gc.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.