memory management questions

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

  1. justmyself macrumors member

    Jan 2, 2009
    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

  2. robbieduncan Moderator emeritus


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

    Jun 29, 2007
    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


    Jul 18, 2008
    This page put it all together for me:

    It also has right way & wrong way examples.

Share This Page