• 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: ARC and IBOutlet - strong vs weak......
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC and IBOutlet - strong vs weak......


  • Subject: Re: ARC and IBOutlet - strong vs weak......
  • From: Clark Cox <email@hidden>
  • Date: Sat, 05 Dec 2015 07:13:09 -0800

> On Dec 4, 2015, at 12:05, Mike Throckmorton <email@hidden> wrote:
>
> Quincey Morris Friday, December 4, 2015 10:04 AM
>
>> That sounds like a definitive answer. So you’re asking us because … why?
>
> Definitive for the leading question, but not the secondary:
>
>> If strong, do I need to set the outlets to nil in the corresponding dealloc method?
>
> I had tested this and it appeared as if I did not need to nil out the reference at dealloc (this makes sense) but is it an on purpose behaviour that is supported by the ARC implementation or is it some side effect that may go away?
>
> Most likely the former, but who likes to leave potential down the road a** biters lying around.

Strong instance variables are automatically released on deallocation. There is no need to set them to nil in dealloc (in fact, if all your dealloc is doing is setting instance variables to nil, I would recommend not having a dealloc method at all).
_______________________________________________

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: 
 >Re: ARC and IBOutlet - strong vs weak...... (From: Mike Throckmorton <email@hidden>)

  • Prev by Date: Re: NSDocument and NSViewControllers
  • Next by Date: Re: NSDocument and NSViewControllers
  • Previous by thread: Re: ARC and IBOutlet - strong vs weak......
  • Next by thread: Setting a Core Data Entity Value
  • Index(es):
    • Date
    • Thread