• 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: NSDocument leak with top-of-NIB object controllers (10.6 ARC)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument leak with top-of-NIB object controllers (10.6 ARC)


  • Subject: Re: NSDocument leak with top-of-NIB object controllers (10.6 ARC)
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 22 Dec 2011 16:44:09 -0600

On 22 Dec 2011, at 4:02 PM, Fritz Anderson wrote:

> Maybe I have to have another look at that horrific little ARC dance. If that's necessary, then I was wrong to declare the object-controller outlets u_u, they should be strong, and I should then do the HLAD.

HLAD was harmful — passing the top-level objects to CFRelease() to relieve the "extra" retention resulted in an overrelease. So now what I'm doing is:

- Declare the property holding the top-level object strong.

- Manually nil-out the property at windowWillClose: time. If I don't do this, the objects' references back to the NSDocument (they are NSControllers bound to model objects through the document) will produce a retain loop so the document will never be dealloced.

This leads me to believe that a 10.6-targeted ARC application, running on 10.7, will _not_ see +1 retained top-level objects.

Which leads me once again to wonder what happens on 10.6. Do the NSControllers get overretained? If so, is there a way to detect the different loading behavior and do an extra release accordingly?

I'm beginning to sense ARC + Mac + NIBs + 10.6 is a corner case that wasn't fully thought out.

	— F

_______________________________________________

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: 
 >NSDocument leak with top-of-NIB object controllers (10.6 ARC) (From: Fritz Anderson <email@hidden>)
 >Re: NSDocument leak with top-of-NIB object controllers (10.6 ARC) (From: Kyle Sluder <email@hidden>)
 >Re: NSDocument leak with top-of-NIB object controllers (10.6 ARC) (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Account validation in CocoaTouch for the purchased app
  • Next by Date: Re: No more warning about registered observers on dealloc with ARC?
  • Previous by thread: Re: NSDocument leak with top-of-NIB object controllers (10.6 ARC)
  • Next by thread: iOS on-disk file encryption questions
  • Index(es):
    • Date
    • Thread