disowning a bundle?
disowning a bundle?
- Subject: disowning a bundle?
- From: Jack Repenning <email@hidden>
- Date: Sat, 23 Feb 2008 18:25:51 -0800
In my -(id)initWithContext:, I [NSBundle loadNibNamed:@"SCCommitUI"
owner:self]. Among other things, this retains me a few times inside
the bundle. When I'm done, I want "self" to go away, but it does not:
the retain count never goest to zero (my dealloc is never called),
because of those retains inside the bundle. How do I make the
bundle / nib let me go?
Doubtless this is also a clue, though not for noobs like me: if I add
an extra autorelease, I get dealloc'ed, but I also get an error, "An
instance of class MyClass is being deallocated while key value
observers are still registered with it." And often, following this, I
get a BAD_ACCESS crash, which I assume is happening 'cause one of
those observers tries to observe the now-deallocated object. So I
want to deregister them, too (or perhaps "they" are the bundle
dictionary above).
-==-
Jack Repenning
Chief Technology Officer
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
mobile: +1 408.835.8090
raindance: +1 877.326.2337, x844.7461
aim: jackrepenning
skype: jrepenning
_______________________________________________
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