Re: Weird problem involving memory management and global variable
Re: Weird problem involving memory management and global variable
- Subject: Re: Weird problem involving memory management and global variable
- From: mmalc Crawford <email@hidden>
- Date: Tue, 29 May 2007 03:07:44 -0700
On May 29, 2007, at 2:13 AM, Sam Stigler wrote:
Everything seems to be fine until another method in the same class
asks for the variable, at which point (although the variable's
retainCount is still 2) I receive an EXC_BAD_ACCESS and
KERN_PROTECTION_FAILURE. Does anyone know why this could be?
Because the variable has been deallocated.
Check your init method, and re-read <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/index.html
>, notably <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html
> and <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html
>.
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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