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

  • SEARCH
  • Home
  • 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 8693903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:39:06+00:00 2026-06-13T00:39:06+00:00

As you read here in most cases a IBOutlet should be weak. Now as

  • 0

As you read here in most cases a IBOutlet should be weak.

Now as you can read in the development library not all classes support weak references.
(e.g. NSTextView). This means you have to use assign:

@property (assign) IBOutlet NSTextView *textView;

If you use a weak reference you will get the following error:
“Synthesis of a weak-unavailable property is disallowed because it requires synthesis of an ivar of the __weak object”

What the documentation missed to mention is now you have to set the property again to nil after it’s usage e.g. by a dealloc method:

- (void)dealloc
{
    self.textView = nil;
} 

As far as I understood classes marked with NS_AUTOMATED_REFCOUNT_WEAK_UNAVAILABLE don’t support weak references but what is the reason?

  • 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-06-13T00:39:07+00:00Added an answer on June 13, 2026 at 12:39 am

    I think I found the reason why some classes don’t support a weak reference:

    As you can read here:

    Rationale: historically, it has been possible for a class to provide its own reference-count implementation by overriding retain, release, etc. However, weak references to an object require coordination with its class’s reference-count implementation because, among other things, weak loads and stores must be atomic with respect to the final release. Therefore, existing custom reference-count implementations will generally not support weak references without additional effort. This is unavoidable without breaking binary compatibility.

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

Sidebar

Related Questions

I read here about std::auto_ptr<>::operator= Notice however that the left-hand side object is not
I've read here that editing a file in-place is not possible since it's OS
First of all, I read erickson's useful reply to Why can’t I define a
I know there are several estimating questions here, and I have read through most
Ok, here's the thing. From DataTable i read number_of_project and number_of_hours_per_day (most of time
As I read here , the VMT also contains a number of magic fields
I have read here http://lostechies.com/jimmybogard/2009/09/18/the-case-for-two-way-mapping-in-automapper/ about how you probably shouldn't be trying to un-flatten
SO I read here In Entity Framework, getting the value of an identity column
Possible Duplicate: Search-like highlighting in NSTextView I thought i read here months ago that
I'm trying to set my entirely table row as an anchor. I've read here

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.