• 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: Nib & retainCount confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nib & retainCount confusion


  • Subject: Re: Nib & retainCount confusion
  • From: Scott Anguish <email@hidden>
  • Date: Wed, 3 Oct 2007 04:36:02 -0400


On Oct 3, 2007, at 3:05 AM, email@hidden wrote:

I have a controller class that loads a nib. The Nib has an 1) NSObjectController and 2) a view. The view has controls which are bound to various properties in the NSObjectController. The NSObjectcontroller's content value is bound to my controller class' dictionary ivar. Whenever I send a release message to my controller class, I expect the dealloc method to be called. I overrode retain & release to see how many times the methods get called and under what cricumstances. It seems that whenever I call the release, the retain count is always at 2, so my dealloc method never gets called. This is a memory leak. Is my controller class being retained through bindings somehow? The same controls that the NSObjectController are bound to are also present in my controller class as IBOutlets. I set them to nil when I want to release the object. Ugh. Any thoughts on what I am doing wrong?

counting the retains in the first place! seriously.

do this type of memory leak debugging using the proper tools, rather than trying to track the retains and releases. search for "memory leaks" in Xcode to find the current tools. The Performance Overview document also points to the correct tools


_______________________________________________

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


  • Follow-Ups:
    • Re: Nib & retainCount confusion
      • From: Patrick Cusack <email@hidden>
References: 
 >Nib & retainCount confusion (From: email@hidden)

  • Prev by Date: Toolbar item with popup menu
  • Next by Date: Re: fetchRequest doesn't give same result as filterPredicate
  • Previous by thread: Nib & retainCount confusion
  • Next by thread: Re: Nib & retainCount confusion
  • Index(es):
    • Date
    • Thread