• 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: Still learning about NSAutoReleasePool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still learning about NSAutoReleasePool


  • Subject: Re: Still learning about NSAutoReleasePool
  • From: Cameron Hayne <email@hidden>
  • Date: Sat, 11 Jun 2005 09:05:40 -0400

On 11-Jun-05, at 8:46 AM, Theodore H. Smith wrote:

perhaps I can override some methods to make NSAutoReleasePool complain that an object has been over added?

I'm quite happy to be told I've got all of this totally wrong, after all I'm still learning the basics of Cocoa.

I'd say that you should stop fiddling around with NSAutoReleasePool and just examine your code (as recommended earlier) to see where you are releasing something that shouldn't be released.
I don't think there really is any substitute for being extremely careful at the time you first write a section of code to make sure that your alloc's & retain's match up with your release's.


As a beginner, you should avoid declaring your own NSAutoReleasePool's - you probably don't need them (the standard autorelease pool will work fine) and they just complicate your code.

--
Cameron Hayne
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: 
 >Still learning about NSAutoReleasePool (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: NSWorkspaceWillSleepNotification message
  • Next by Date: Re: need help with linking error
  • Previous by thread: Still learning about NSAutoReleasePool
  • Next by thread: Re: Still learning about NSAutoReleasePool
  • Index(es):
    • Date
    • Thread