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

Questions about Nib Object Retention


  • Subject: Questions about Nib Object Retention
  • From: an0 <email@hidden>
  • Date: Wed, 21 Oct 2009 11:40:43 +0800

Nib Object Retention<http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html#//apple_ref/doc/uid/10000051i-CH4-SW6>


 Mac OS X - managed memory model

Objects in the nib file are initially created with a retain count of 1. As
it rebuilds the object hierarchy, however, AppKit autoreleases any objects
that have a parent or owning object, such as views nested inside view
hierarchies. By the time the nib-loading code is done, only the top-level
objects in the nib file have a positive retain count and no owning object.
Your code is responsible for releasing these top-level objects.


Here are my questions:

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

Are they retained for outlet connections?

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


--
Hell boy is cool, but let me be healthy boy first.
_______________________________________________

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:
    • GC Re: Questions about Nib Object Retention
      • From: Fritz Anderson <email@hidden>
    • Re: Questions about Nib Object Retention
      • From: Joar Wingfors <email@hidden>
    • Re: Questions about Nib Object Retention
      • From: Graham Cox <email@hidden>
  • Prev by Date: Problems with NSCollectionView
  • Next by Date: Re: Questions about Nib Object Retention
  • Previous by thread: Problems with NSCollectionView
  • Next by thread: Re: Questions about Nib Object Retention
  • Index(es):
    • Date
    • Thread