Re: NSButtonCell image leaking? [SOLVED]
Re: NSButtonCell image leaking? [SOLVED]
- Subject: Re: NSButtonCell image leaking? [SOLVED]
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 4 Sep 2007 15:14:08 -0700
On Sep 4, 2007, at 2:58 PM, Giovanni Donelli wrote:
The leak I was having seem to be a false positive from "leaks".
Also the
fact that the memory was constantly growing (as I was observing it
from top)
was due to the fact that I had MallocStackLogging=1 which probably
adds a
memory overhead to keep track of memory usage.
Yup -- MallocStackLogging will make the heap grow a bit with every
allocation or deallocation event. Very very useful debugging tool
-- but very expensive.
You can reduce the number of false positives emitted by "leaks" by
turning on malloc scribbling. See the malloc man page and look for
MallocScribble and MallocPreScribble.
It does what the name implies -- scribbles a known byte pattern on
hunks of memory at allocation time and after deallocation. This'll
bust programs that are reading from said uninitialized memory. It'll
also help "leaks" in that it no longer will see pointers left over
from previous use of the memory.
You can still end up with false positives, but many many fewer.
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden