crash on custom NSWindow subclass dealloc
crash on custom NSWindow subclass dealloc
- Subject: crash on custom NSWindow subclass dealloc
- From: "Wesley Smith" <email@hidden>
- Date: Wed, 19 Dec 2007 01:19:55 -0800
I have a custom subclass of NSWindow that I've defined a dealloc
method for as so:
- (void)dealloc
{
[ogl_view release];
NSZoneFree([self zone], [self zone]);
[super dealloc];
}
Things work fine until the program hits "[super dealloc];". At that
point, I get a crash every time and the stack looks like this:
#0 0x0181b028 in ??
#1 0x900052ef in free
#2 0x9080dfc0 in CFRelease
#3 0x932aeabe in -[NSWindow _setWindowNumber:]
#4 0x9333d0da in -[NSWindow _termWindowIfOwner]
#5 0x9333c2c5 in -[NSWindow dealloc]
#6 0x004386bb in -[CocoaOpenGLWin dealloc] at cocoa_opengl_win.m:51
I'm not sure what's going on at all. What are the mechanics of
deallocating a custom NSWindow subclass? I feel I'm missing something
crucial here because even when I pare the class down to almost
nothing, it still crashes.
thanks,
wes
_______________________________________________
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