• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie question


  • Subject: Re: newbie question
  • From: Hank Heijink <email@hidden>
  • Date: Fri, 10 Nov 2006 10:17:05 -0500

do i have to create a NSAutoreleasePool, adding every single object i create to the pool myself?

I suggest you read the Memory Management guide:

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/ index.html

I'm guessing you created a command-line application -- If you create a Cocoa application project, the autorelease pool is created for you, but if you create a command line application, you have to do it yourself. If you let XCode create the command line project, the example code it generates has the pool in place already.

Most importantly: you don't add objects to the pool, they are added by the system as they receive autorelease messages.

Good luck!
Hank


Hank Heijink www.hankheijink.com email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >newbie question (From: maximilian marcoll <email@hidden>)

  • Prev by Date: Re: Convert path format?
  • Next by Date: Re: newbie question
  • Previous by thread: newbie question
  • Next by thread: Re: newbie question
  • Index(es):
    • Date
    • Thread