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 8215295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:44:08+00:00 2026-06-07T11:44:08+00:00

Under ARC, if I define a ivar like this: @interface ObjectA : NSObject {

  • 0

Under ARC,
if I define a ivar like this:

@interface ObjectA : NSObject {
    id A;
}

@property(nonatomic,unsafe_unretained) id A;

What’s the property of A? strong or unsafe_unretained?

  • 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-07T11:44:11+00:00Added an answer on June 7, 2026 at 11:44 am

    It depends on how you implement it. There are two ways you can go about doing it:

    • Using @synthesize A; or @synthesize A = __A; In this case it’s __unsafe_unretained, because the ownership spec of the property trumps the ownership spec of the ivar1.
    • Manually writing A and setA. In this case, the result will depend on the kind of backing variable that you choose for your implementation.2

    Here is a link to the documentation that spells out the rules of how the ownership of properties is determined. See Section 4.1.1.

    1 If the associated instance variable already exists, then its ownership qualification must equal the ownership of the property; otherwise, the instance variable is created with that ownership qualification [of the property].

    2 A property’s specified ownership is preserved in its metadata, but otherwise the meaning is purely conventional unless the property is synthesized.

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

Sidebar

Related Questions

Possible Duplicate: Should IBOutlets be strong or weak under ARC? In the documentation, I
Under ARC , I have an object, Child that has a weak property, parent
With all this new ARC stuff (which does not fall under NDA…) coming out,
Under the documentation for UIViewController -> nibName property it says: This property contains the
Whats wrong with this code under ARC? I get above error: - (Moment *)initMoment:(BOOL)insert
Under ARC, what's the point of making every IBOutlet a property? What would be
I want to write something like this: @interface Foo{ __strong id idArray[]; } @end
Like a doop I'd been declaring Instant Variables (iVar) and then @property in the
As I assumed, this should work's fine for immutable object under ARC: - (id)
Under ARC, is it possible to encode/decode a CGMutablePathRef (or its non-mutable form) using

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.