Re: Releasing a sub-view
Re: Releasing a sub-view
- Subject: Re: Releasing a sub-view
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 28 Apr 2004 19:07:26 +0100
On 28 Apr 2004, at 5:02 pm, Lorenzo wrote:
- (void)startAnimation
{
theView = [[XAView alloc] initWithFrame:theFrame];
[self addSubview:theView];
[theView release];
}
- (void)stopAnimation
{
[super stopAnimation];
[theView removeFromSuperviewWithoutNeedingDisplay];
[theView release];
}
I don't know what to suggest to deal with the flash, but you don't need
this second -release. theView will be released automatically when it's
removed from the superview. This is a crash waiting to happen...
Regards,
-Jeremy
_______________________________________________
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.