Re: Problem with [NSStatusItem setTitle:]
Re: Problem with [NSStatusItem setTitle:]
- Subject: Re: Problem with [NSStatusItem setTitle:]
- From: Cameron Hayne <email@hidden>
- Date: Thu, 18 Sep 2003 23:12:52 -0400
On 9/17/03 11:43 PM, "Yonatan Feldman" <email@hidden> wrote:
>
I am writing a status bar application that updates the title of the
>
status item at a regular interval, a la "menu bar clock". After
>
leaving my application running all night at a "fast interval" I
>
noticed that it grew dramatically in memory foot print.
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.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
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.