On 16 Nov 2009, at 06:14, Chris Carson wrote:

> 
> The application runs pretty well, and running it through the Leaks instrument 
> there are no leaks except for 16-bytes when the application is first starting 
> caused by IOUSBLib. However, looking at it in the Activity Monitor, the real 
> memory used starts off at 25 MB and steadily grows to 250+ MB while the 
> virtual memory starts off at about the same and steadily grows to about the 
> same or sometimes close to 500MB, over the course of several minutes. This 
> especially happens if I don't move the mouse for a while, or don't have the 
> application in focus. As soon as a move the mouse or bring the application 
> into focus, it's as if an autorelease pool is drained and the memory drops 
> back down to 30-40MB real and 30-40MB virtual. This is annoying since the 
> application hangs for 5 seconds or so when this memory draining is occurring. 
> Has anyone dealt with this before? Any ideas on what could be causing this 
> and how to work around it?

It always used to be the case that NSTimer firings didn't count as "real" 
events so the autorelease pool didn't drain if the only "events" in your app 
were timer events.  As soon as you do something to fire a real event e.g. move 
the mouse or bring the app to the front, the autorelease pool drains.

I guess the work around would be to create your own pool at the beginning of 
the timer firing code and drain it at the end.


> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> Please 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:
> http://lists.apple.com/mailman/options/cocoa-dev/adc%40jeremyp.net
> 
> This email sent to [email protected]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to