• 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: Is there a way to see who is retaining an object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to see who is retaining an object?


  • Subject: Re: Is there a way to see who is retaining an object?
  • From: Corbin Dunn <email@hidden>
  • Date: Fri, 17 Jun 2005 13:48:56 -0700


This is the closest thing I can find to getting information about who is doing retains and releases - in my app there seem to be a lot of events so it will take some digging to find the unpaired retains (I'm happy to do this - just want to make sure I'm not missing some easier way)

Oh, and while i'm on the subject, I'll go over how I find memory leaks using Object Alloc.


1. Start the offending process, turning on retain events (previously mentioned)
2. Run till in a known state
3. Do the operation that causes the leak once (to setup things)
4. In "Global Allocations", check "Autosort", and click on the "Current" header
5. Click "Show since mark"
6. Click "Set Mark" on the toolbar.
7. Repeat the offending memory leak operation


Now, you should see all instances still "alive" and potentially leaked at the top of the list. Then, you can look at who is not releasing them, and figure out why. Be warned...the appkit caches some things which may appear to be leaks.

--corbin

_______________________________________________
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


  • Follow-Ups:
    • Re: Is there a way to see who is retaining an object?
      • From: Rick Hoge <email@hidden>
References: 
 >Is there a way to see who is retaining an object? (From: Rick Hoge <email@hidden>)
 >Re: Is there a way to see who is retaining an object? (From: Corbin Dunn <email@hidden>)
 >Re: Is there a way to see who is retaining an object? (From: Rick Hoge <email@hidden>)

  • Prev by Date: Re: Is there a way to see who is retaining an object?
  • Next by Date: Re: hidden files & NSFileManager
  • Previous by thread: Re: Is there a way to see who is retaining an object?
  • Next by thread: Re: Is there a way to see who is retaining an object?
  • Index(es):
    • Date
    • Thread