memory management questions

Discussion in 'iOS Programming' started by justmyself, Jan 24, 2009.

  1. justmyself macrumors member

    Joined:
    Jan 2, 2009
    #1
    I've been wanting to develop for the iphone and had a couple of questions. How does the init alloc and release memory stuff work. When do you init? allow? and when do you release? I know it's probably pretty basic but it's nothing I've dealt with and I hear you have to manage memory with the iphone? FWIW I'm currently using 10.4 and have developed a couple of apps but I want to know they brought over to the iphone before I go out and buy 10.5

    Thanks
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Read the programming guide on Apple's developer site. It covers all off this and more that you must know
     
  3. detz macrumors 65816

    Joined:
    Jun 29, 2007
    #3
    Google it too, there are some great blog posts about it out there. Memory management is probably one of the hardest things to wrap you head around as a beginner because you're dealing with reference counters etc...but once you understand it it's pretty easy.

    Basically, If you alloc an object you have to release it. There are more complicated things like autorelease and copy but first you have to understand the basics.
     
  4. xsmasher macrumors regular

    xsmasher

    Joined:
    Jul 18, 2008
    #4
    This page put it all together for me:
    http://www.stepwise.com/Articles/Technical/2001-03-11.01.html

    It also has right way & wrong way examples.
     

Share This Page