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

jbucaran

macrumors newbie
Original poster
Aug 7, 2008
28
0
Hello,

I have read that implementing GC in the iPhone would have some impact in the battery however I haven't found a complete / elaborate answer to the following question: * When will the iPhone support garbage collection?

Thanks
 
Thanks because there is no complete answer. Nobody really knows except maybe internally at Apple. And they're not saying. There's always the chance that GC will never be supported on the iPhone, although I'd say that pretty doubtful. But for the time being, it just isn't available. And I think, for now, it's helping to incite more efficient apps given the limited resources of the iPhone / iPod touch.
 
Garbage collection is computationally expensive and rarely leads to memory management that is as efficient as doing it (correctly) manually. I can see them not including it for quite a while until more powerful hardware is available, and even then it might be a better idea to leave it off to avoid wasting battery life.
 
In addition, garbage collection algorithms usually have very poor data cache locality, which reduces battery life even more than the time slices required would suggest.

GC makes prototyping certain types of apps much easier for the programmer, but it generally makes apps slower and have less predictable responsiveness, as well as eating battery life. What benefits does GC provide an end user in exchange?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.