• 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
releasing NSProgressIndicator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: releasing NSProgressIndicator
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: RE: Better way than GetNextProcess()?
  • Next by Date: Keypress problems
  • Previous by thread: Re: Table view active sorting and filter as model changes...
  • Next by thread: Re: releasing NSProgressIndicator
  • Index(es):
    • Date
    • Thread