Re: Unconventional memory leak problem
Re: Unconventional memory leak problem
- Subject: Re: Unconventional memory leak problem
- From: Matt Neuburg <email@hidden>
- Date: Tue, 05 Sep 2006 20:57:13 -0700
- Thread-topic: Unconventional memory leak problem
On Wed, 6 Sep 2006 09:56:38 +1000, Rodney Kennedy <email@hidden> said:
>I have something that appears like a memory leak with the
>culprit allocations are related to drawing interface objects
>such a NSTableView in 4 or so windows. This is a problem
>when I run in a batch mode which induces a considerable amount of
>screen drawing including rendering images. The odd thing is
>when I interact with the running Application, such as click on
>a window or activate or deactivate the application this induces
>the AppKit deallocations. If I leave it alone as the active
>application or it is not active the real and virtual memory uses
>rise and the application will eventually crash.
>
>This is not like a conventional memory leak since there are
>deallocations.
>
>I do run multiple threads
You probably just need autorelease pools:
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concep
ts/AutoreleasePools.html>
You might also have to recache each image when done with it, in order to
force the image to deallocate fully (sorry I'm a bit hazy on this - not
meaning, "I've forgotten," but meaning, "I've never been quite clear on the
best procedure"). m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden