• 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: NSOperation and NSAutoreleasePool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOperation and NSAutoreleasePool


  • Subject: Re: NSOperation and NSAutoreleasePool
  • From: Andy Lee <email@hidden>
  • Date: Sat, 07 Mar 2009 19:08:28 -0500

On Mar 7, 2009, at 6:48 PM, Kyle Sluder wrote:
On Sat, Mar 7, 2009 at 5:52 PM, Aaron Wallis <email@hidden> wrote:
When I step through the process in debugger it just confuses me more.
I've put a breakpoint on the "self.delegate = tDelegate" assignment and
stepped through each part of the process (until the error occurs).

I really, *really* cannot emphasize this enough. You are experiencing the well-known symptoms of failing to retain an object. It's not crashing because another object happens to be allocated in its place. Someone somewhere is failing to retain, or is releasing to early, your delegate object. The problem is not caused by the synthesized accessor/mutator, it is merely masked by your avoidance thereof.

Fix your memory management bug, and hopefully unsurprisingly your
buggy behavior will go away.

In particular, what is the old value of the delegate? If it's non- nil, maybe it's getting dealloc'ed when the setter method releases it and that is what is revealing your memory bug.


Did you try NSZombieEnabled?

--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: 
 >Fwd: NSOperation and NSAutoreleasePool (From: Aaron Wallis <email@hidden>)
 >Re: NSOperation and NSAutoreleasePool (From: Kyle Sluder <email@hidden>)
 >Re: NSOperation and NSAutoreleasePool (From: Aaron Wallis <email@hidden>)
 >Re: NSOperation and NSAutoreleasePool (From: Roland King <email@hidden>)
 >Re: NSOperation and NSAutoreleasePool (From: Aaron Wallis <email@hidden>)
 >Re: NSOperation and NSAutoreleasePool (From: Roland King <email@hidden>)
 >Re: NSOperation and NSAutoreleasePool (From: Aaron Wallis <email@hidden>)
 >Re: NSOperation and NSAutoreleasePool (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Can an object observe itself?
  • Next by Date: NSArrayController -- will change selection?
  • Previous by thread: Re: NSOperation and NSAutoreleasePool
  • Next by thread: Re: NSOperation and NSAutoreleasePool
  • Index(es):
    • Date
    • Thread