GC in iPhone apps

Discussion in 'iOS Programming' started by Nefigah, Sep 20, 2009.

  1. Nefigah macrumors newbie

    Joined:
    Sep 20, 2009
    #1
    Hello, I'm just now learning some ObjC/Cocoa programming with the goal of doing some iPhone development eventually. I'm reading a book called Cocoa Programming for Mac OS X, 3rd Ed. I'm to the part where he is discussing memory management.

    A couple questions, if I may:

    1) Can the GC be used in iPhone apps? If so, is it recommended?
    2) Assuming it can, is it as stupid as it seems to be from the examples in the book? Right now he's explicitly setting pointers that he's done with to nil; this would be silly in most of the managed languages I'm familiar with. Can the GC really not tell when something isn't needed by itself?
     
  2. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
  3. xGrill macrumors member

    Joined:
    Aug 27, 2008

Share This Page