Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6669231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:07:33+00:00 2026-05-26T03:07:33+00:00

There is a similar question to this on SO here , however I just

  • 0

There is a similar question to this on SO here, however I just want to clarify something that wasn’t fully explained there.

I understand that all delegates and outlets – in fact any reference to a “parent” object, to be a good citizen and think about the object graph for a minute – should be zeroing weak references. Due to the nature of zeroing weak pointers automatically dropping to nil on the referenced object’s retain count reaching zero, does this mean that setting IBOutlets to nil in viewDidUnload is now unnecessary?

So, if I declare my outlet like so:

@property (nonatomic, weak) IBOutlet UILabel *myLabel;

Does the following code have any effect?

- (void)viewDidUnload
{
    self.myLabel = nil;

    [super viewDidUnload];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:07:33+00:00Added an answer on May 26, 2026 at 3:07 am

    Just doing a bit of research…

    As I understand it, weak is similar to assign, in that they’re both weak references.

    However, assign does not create a zeroing reference. i.e. if the object in question is destroyed, and you access that property, you WILL get a BAD_ACCESS_EXCEPTION.

    Weak properties are automatically zeroed (= nil) when the object it is referencing is destroyed.

    In both cases, it is not necessary to set property to nil, as it does not contribute to the retain count of the object in question. It is necessary when using retain properties.

    Apparently, ARC also introduces a new “strong” property, which is the same as “retain”?

    Research done here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There seems to be a similar question to this on here but with the
This is a question similar to a question here . I wonder is there
Note: There is a very similar question here . Bear with me, however; my
I found a similar question about this but aimed at Debian here . However
(Similar in spirit to but different in practice from this question .) Is there
This is similar to a previous question , but the answers there don't satisfy
I'm sorry if this is similar to an earlier question but this is something
I posted a question similar to this earlier, however, after thinking about it and
This is similar to this question C# Get schema information when validating xml However,
There is a similar question going around, but it just got the same old

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.