View Full Version : Do I need to Start the Garbage Collector?

Sep 16, 2010, 11:04 AM
Running through the Core Data Utility Tutorial, and it says that I need to turn on garbage collection in the build settings, and add the function call


in order to "start the garbage collector." Now in all the applications I've written so far, I turned on the garbage collector in the build settings, but I never heard of this function call before. Does that mean that the garbage collector wasn't working in my previous apps, or is this requirement just for command line tools?

Sep 16, 2010, 11:17 AM

See the "Foundation Tools" section.


Sep 16, 2010, 11:25 AM
NSApplicationMain() calls it for you in AppKit apps. You only need to do it for commandline tools and such.