releasing NSProgressIndicator
releasing NSProgressIndicator
- Subject: releasing NSProgressIndicator
- From: "Oscar Bascara" <email@hidden>
- Date: Tue, 22 May 2007 23:39:13 -0700
Hi All,
I'm programmatically creating and later destroying an
NSProgressIndicator object. But somewhere along the long line, the
retainCount for the object remains at 1. Any idea?
To create:
NSProgressIndicator *progressIndicator = [[[NSProgressIndicator alloc]
initWithFrame:frameRect] autorelease];
[progressIndicator setStyle:NSProgressIndicatorSpinningStyle];
[view addSubview:progressIndicator];
[progressIndicator startAnimation:self];
To destroy:
[progressIndicator stopAnimation:self];
[progressIndicator removeFromSuperview];
Oddly, if I create a second NSProgressIndicator object as above, the
first object suddenly does get released. This appears to happen
directly after the animationStart. Could it be that the first object
was being retained in an animation thread and then got released when
the second object needed to animate?
Oscar
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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