Weird problem involving memory management and global variable
Weird problem involving memory management and global variable
- Subject: Weird problem involving memory management and global variable
- From: Sam Stigler <email@hidden>
- Date: Tue, 29 May 2007 19:13:43 +1000
Hi,
I've spent the past several hours trying to tackle a very annoying
problem relating to a global variable I have declared in my
MyDocument.h: It is declared there, but I am allocating and
initializing in the document's windowControllerDidLoadNib: method
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? I've
posted the relevant code to http://homepage.mac.com/sstigler1985/
memoryproblem.html .
Thanks,
Sam
_______________________________________________
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