Do I need to Start the Garbage Collector?

Discussion in 'Mac Programming' started by BadWolf13, Sep 16, 2010.

  1. BadWolf13 macrumors 6502

    Dec 17, 2009
    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?
  2. Catfish_Man macrumors 68030


    Sep 13, 2001
    Portland, OR
    NSApplicationMain() calls it for you in AppKit apps. You only need to do it for commandline tools and such.

Share This Page