• 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: Memory Management Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Management Question


  • Subject: Re: Memory Management Question
  • From: Andy Lee <email@hidden>
  • Date: Mon, 2 Jul 2007 12:21:34 -0400

On 7/2/07, Seth Pellegrino <email@hidden> wrote:
Hello all,

I'm getting a lot of EXC_BAD_ACCESS errors from my code, mostly
because I call [object release] and then later on call [object
someOtherMethod].

In addition to the good comments you've gotten already, I'd consider whether autorelease rather than release is more appropriate. autorelease defers release until the next iteration of the event loop.


Also you might want to reread the docs on memory management and what it means to balance retains and releases.

--Andy

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Memory Management Question (From: Seth Pellegrino <email@hidden>)
 >Re: Memory Management Question (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Looking for NSCollectionView sample code
  • Next by Date: Re: Cocoa and dead-code stripping
  • Previous by thread: Re: Memory Management Question
  • Next by thread: Re: Memory Management Question
  • Index(es):
    • Date
    • Thread