Re: Trying to understand the cause of a "message sent to deallocated instance" error
Re: Trying to understand the cause of a "message sent to deallocated instance" error
- Subject: Re: Trying to understand the cause of a "message sent to deallocated instance" error
- From: Nick Zitzmann <email@hidden>
- Date: Sat, 7 Mar 2009 14:54:08 -0700
On Mar 7, 2009, at 2:24 PM, Matt Crocker wrote:
Can anyone give me any pointers of how to proceed? I've tried a few
obvious things such as removing the "release" commands in the
dealloc method, and am loathed to start removing big chunks of code
elsewhere to see what happens...
Use Instruments' object alloc instrument with retain/release counting
turned on. Run your program and reproduce the problem. Watch the
console for the error to appear. Pause Instruments (if necessary) and
look for the activity in that memory address. The backtraces presented
in the most recent usages ought to help you isolate the problem, which
is usually (a) an over-release, or (b) a proper release, but you kept
the old pointer around instead of reassigning it.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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