• 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: Questions about Nib Object Retention
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about Nib Object Retention


  • Subject: Re: Questions about Nib Object Retention
  • From: Graham Cox <email@hidden>
  • Date: Wed, 21 Oct 2009 14:55:19 +1100


On 21/10/2009, at 2:40 PM, an0 wrote:

Who owns the unarchived top-level objects' initial positive retain count?

Nobody. That's what "no owning object" means.

Are they retained for outlet connections?

No, because if there is an outlet to them then they are owned.

Or are they just not autoreleased only because they are top-level,
regardless of whether there are any outlet connected to them?


They are not autoreleased because that would presumably cause problems for the users of these objects, who don't own them either. If there's an outlet to them, they are owned by whoever declares the outlet.

As it says, "Your code is responsible for releasing these top-level objects".

This is not the big issue it seems. Most nibs don't contain top level objects with no owners. For the very few that do, the objects most likely leak but typically that's no big deal unless you're loading the same nib repeatedly many times.

--Graham


_______________________________________________

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: Questions about Nib Object Retention
      • From: an0 <email@hidden>
    • Re: Questions about Nib Object Retention
      • From: Kyle Sluder <email@hidden>
References: 
 >Questions about Nib Object Retention (From: an0 <email@hidden>)

  • Prev by Date: Questions about Nib Object Retention
  • Next by Date: Re: Child window shows up on top despite specifying NSWindowBelow
  • Previous by thread: Questions about Nib Object Retention
  • Next by thread: Re: Questions about Nib Object Retention
  • Index(es):
    • Date
    • Thread