Newbie question: When will iPhone support GC?

Discussion in 'iOS Programming' started by jbucaran, Jun 4, 2009.

  1. jbucaran macrumors newbie

    jbucaran

    Joined:
    Aug 7, 2008
    #1
    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
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    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.
     
  3. admanimal macrumors 68040

    Joined:
    Apr 22, 2005
    #3
    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.
     
  4. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #4
    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?
     

Share This Page