Memory Management Question
Memory Management Question
- Subject: Memory Management Question
- From: Seth Pellegrino <email@hidden>
- Date: Mon, 2 Jul 2007 11:40:17 -0400
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]. The workaround I've found is that every time I call
[object release] I then assign object = nil, and every time I'm
working with a possibly dead object, I wrap the code in an if
(object) { } block.
That seems like an odd way to manage objects, though. Am I doing
something wrong, or is there at least a way to compress the "release
and assign nil" block into one line?
Thanks for your help,
Seth
_______________________________________________
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