Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nefigah

macrumors newbie
Original poster
Sep 20, 2009
1
0
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.