Re: Class hierarchy weirdness.
Re: Class hierarchy weirdness.
- Subject: Re: Class hierarchy weirdness.
- From: Marco Scheurer <email@hidden>
- Date: Thu, 18 Apr 2002 11:50:29 +0200
On Thursday, April 18, 2002, at 11:27 am, Kigney wrote:
In my program, I have a class hierarchy looks like
this, from top to bottom:
NSObject
MyObject
Character
When [characterInstance dealloc] is called, though,
something _very_ strange happens. Here's my best
attempt to diagram it as a stack. Note: all of the
methods below call [super dealloc] at the end of their
own dealloc methods.
[characterInstance dealloc]
[myObjectInstance dealloc]
[characterInstance dealloc]
[myObjectInstance dealloc]
Signal 11, or signal 10. The program
quits.(Probably because it's trying to re-deallocate
myObjectInstance's data members.)
I think that your implementation of MyObject's dealloc is wrong and
sends dealloc to self instead of super.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.