• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSButtonCell image leaking? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: NSButtonCell image leaking? [SOLVED] (From: "Giovanni Donelli" <email@hidden>)

  • Prev by Date: Re: NSButtonCell image leaking? [SOLVED]
  • Next by Date: Re: Setting up the nextKeyView programmatically
  • Previous by thread: Re: NSButtonCell image leaking? [SOLVED]
  • Next by thread: compiler warning when attempting to save hex value in char in reusing it
  • Index(es):
    • Date
    • Thread