• 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
Re: Problem with [NSStatusItem setTitle:]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with [NSStatusItem setTitle:]


  • Subject: Re: Problem with [NSStatusItem setTitle:]
  • From: Yonatan Feldman <email@hidden>
  • Date: Mon, 22 Sep 2003 14:39:52 -0400
  • Mail-followup-to: email@hidden

On 2003-09-19 @ 05:12:26, Cameron Hayne wrote:
> I found that my application, which has a continually updating display
> of information (without any user interaction except for preferences)
> leaked memory because the NSAutoreleasePool was never getting emptied.
> I had to put the [[NSAutoreleasePool alloc]init] and [pool release]
> inside my socket activity handler to avoid this problem. The standard
> NSApplication loop doesn't seem to do the right thing with the
> autorelease pool unless there are some events from user-interaction.

The call to [NSStatusItem setTitle:] is in a selector
(updateStatusItem:) which already has an
[[NSAutoreleasePool alloc] init] as the first line and [pool release] as
the last line. This selector is called using:

[NSThread detachNewThreadSelector:@selector(updateStatusItem:)
toTarget:self
withObject:nil];

Any other ideas/suggestions?
_______________________________________________
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.

References: 
 >Problem with [NSStatusItem setTitle:] (From: Yonatan Feldman <email@hidden>)

  • Prev by Date: Re: Objective-C Question
  • Next by Date: Re: LSUIElement?!
  • Previous by thread: Re: Problem with [NSStatusItem setTitle:]
  • Next by thread: NSDraggingInfo to DragRef
  • Index(es):
    • Date
    • Thread