• 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: Should I retain/release IBOutlet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I retain/release IBOutlet?


  • Subject: Re: Should I retain/release IBOutlet?
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 17 May 2006 15:44:33 -0700


On May 17, 2006, at 1:02 PM, Eric wrote:
On 5/17/06, Julien Jalon <email@hidden> wrote:
object -> object IBOutlet link does not suppose any retain- release. If
you have a top-level object instantiated by the nib-loading linked to
an other object using IBOutlet, this top-level object is not
considered having any ownership to that other object so does not need
to release it.
Nobody can answer your question "If my custom controller class
contains IBOutlet to other objects in the nib (like UI element), should
the custom controller retain its IBOutlets" as we don't know what the
relationship between your controller and that UI element is meant to
be. If you consider that the controller needs ownership to that
element, you need to add an extra retain after nib-loading ensuring
that your controller will prevent the element to be deallocated
without its consent.



This is misleading/inaccurate/wrong.

So I can kind of consider IBOutlet to be a type of weak reference.

As a *general* statement, no.
IBOutlet is simply a flag used specifically by Interface Builder. It has no other semantics. Look to see what it's defined as...


I don't understand why it seems so difficult to accept what's written in the documentation? It's all covered there, and there's not much to it...

mmalc

_______________________________________________
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


  • Follow-Ups:
    • Re: Re: Should I retain/release IBOutlet?
      • From: "Julien Jalon" <email@hidden>
References: 
 >Should I retain/release IBOutlet? (From: Eric <email@hidden>)
 >Re: Should I retain/release IBOutlet? (From: Lon Giese <email@hidden>)
 >Re: Should I retain/release IBOutlet? (From: Bill Bumgarner <email@hidden>)
 >Re: Should I retain/release IBOutlet? (From: Eric <email@hidden>)
 >Re: Should I retain/release IBOutlet? (From: mmalcolm crawford <email@hidden>)
 >Re: Should I retain/release IBOutlet? (From: Eric <email@hidden>)
 >Re: Re: Should I retain/release IBOutlet? (From: Eric <email@hidden>)

  • Prev by Date: Re: what's an easy way to use NSBrowser?
  • Next by Date: Re: How to create "pressed" effect on custom rounded buttons (like Safari bookmark)
  • Previous by thread: Re: Re: Should I retain/release IBOutlet?
  • Next by thread: Re: Re: Should I retain/release IBOutlet?
  • Index(es):
    • Date
    • Thread