• 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: Detecting memory leaks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting memory leaks


  • Subject: Re: Detecting memory leaks
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 8 Sep 2005 20:38:12 -0600


On Sep 8, 2005, at 1:36 PM, email@hidden wrote:

In MallocDebug I switch to Leaks and it performs the analysis. First question, is this what I want to do to detect memory leaks?

That's one way. The other is to use the "leaks" command line tool. Or, if your app only allocates ObjC objects, then you could run your task in ObjectAlloc, turn on retain/release event recording, pause just before the task is performed, set a marker, start the task, watch object allocation, and look at individual objects for signs of over-retention. I've had to resort to that at least once when there was some leaking going on in one of my apps that MallocDebug didn't catch.


Second question, if it is and the call that MallocDebug is finding is a system call, is there something I can do about it?

All leaks eventually end in a kernel function that allocates the memory, e.g. malloc(). You need to look in between that and main() for your own application's symbols; they are the origins of the leak. If your application's symbols don't show up anywhere, then there may not be anything you can do.


Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________
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


References: 
 >Detecting memory leaks (From: email@hidden)

  • Prev by Date: Re: Quick Question: Can't alloc an NSInvocation?
  • Next by Date: Re: Undoable controls
  • Previous by thread: Re: Detecting memory leaks
  • Next by thread: multiple array controllers ?
  • Index(es):
    • Date
    • Thread