Re: Problem with [NSStatusItem setTitle:]
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.