Re: NSOperation and NSAutoreleasePool
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