• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
crash on custom NSWindow subclass dealloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: crash on custom NSWindow subclass dealloc
      • From: "Shawn Erickson" <email@hidden>
    • Re: crash on custom NSWindow subclass dealloc
      • From: "Wesley Smith" <email@hidden>
  • Prev by Date: Re: CoreData huge memory usage - is this right ?
  • Next by Date: Re: Creating Gray Scale Image give big leak...
  • Previous by thread: Re: How to use NSMutableArray's filteredArrayUsingPredicate
  • Next by thread: Re: crash on custom NSWindow subclass dealloc
  • Index(es):
    • Date
    • Thread