• 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 top-level object ownership?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nib top-level object ownership?


  • Subject: Re: Nib top-level object ownership?
  • From: Camillo Lugaresi <email@hidden>
  • Date: Sat, 31 Dec 2005 13:42:50 +0100

On 31/dic/05, at 13:34, Camillo Lugaresi wrote:

Another solution could be this:
- get your retain count before and after loading the nib, and save the difference in an ivar;
- override release: when your retain count drops to the saved difference (ie only the objects in the nib are retaining you), release the top-level objects.

Of course, that could cause surprises if you programmatically unbind views that have retained your controller. Nothing should get over- released, but the controller might release the top-level objects ahead of time.

Is there an Apple-sanctioned solution to this whole problem?

Camillo
_______________________________________________
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
References: 
 >Nib top-level object ownership? (From: Jim Correia <email@hidden>)
 >Re: Nib top-level object ownership? (From: Ricky Sharp <email@hidden>)
 >Re: Nib top-level object ownership? (From: Camillo Lugaresi <email@hidden>)

  • Prev by Date: Re: Nib top-level object ownership?
  • Next by Date: Re: Agent Applications and launchd
  • Previous by thread: Re: Nib top-level object ownership?
  • Next by thread: Re: Nib top-level object ownership?
  • Index(es):
    • Date
    • Thread