cwolves
Apr 22, 2009, 12:46 AM
I have an object that is released in the middle of doing something. Specifically, it's an animation. When it changes to a frame, an event gets called via an NSNotification, and the subscriber sometimes releases the object.
The issue I'm running into is that after the object is released, control passes back to the object. It then calls [super render] which renders another frame of the animation.
If I check self at any point after the release, I get a type of "FREED(ID) *", with all the data still intact.
So my question is, is there a "correct" way of saying "only call [super render] if I still exist"?
btw "if(self){" doesn't work. :D
The issue I'm running into is that after the object is released, control passes back to the object. It then calls [super render] which renders another frame of the animation.
If I check self at any point after the release, I get a type of "FREED(ID) *", with all the data still intact.
So my question is, is there a "correct" way of saying "only call [super render] if I still exist"?
btw "if(self){" doesn't work. :D
