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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:25:23+00:00 2026-05-30T02:25:23+00:00

Though the question is basic, but I found it very crucial to understand to

  • 0

Though the question is basic, but I found it very crucial to understand to proceed with IOS programming. Sometimes we used to declare only instance variable and we don’t set any associated property to it. Some where we just declare the properties and use synthesize to get or set the values. Sometimes I feel necessary to declare both in code, when compilation gives me warnings! What’s the fundamental behind the manipulation of properties in Objective C. I know the basic requirement to create getter and setter for any instance variable, but when?
I have seen it many times we don’t use property at all, and after that too we easily set and get variable’s value. Also, different types of property like atomic, non atomic, strong, retain are very unclear to me. XCODE up-gradation to 4.2 has shaken my concepts about memory management. Can somebody please clear the cloud over my mind?

  • 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-30T02:25:25+00:00Added an answer on May 30, 2026 at 2:25 am

    Properties are always the preferred way over direct ivar access, mostly of following reasons:

    • You can override a getter or setter in a subclass
    • You can define the "assigning behavior" (namely copy, assign, retain/strong, weak)
    • You can synchronize ivar access

    Keywords:

    • copy: The object is copied to the ivar when set
    • assign: The object’s pointer is assigned to the ivar when set
    • retain/strong: The object is retained on set
    • weak: In ARC this is like assign, but will be set to nil automatically when the instance is deallocated, also used in a garbage collected environment.
    • nonatomic: The accessor is not @synchronized (threadsafe), and therefore faster
    • atomic: The accessor is @synchronized (threadsafe), and therefore slower

    Generally you should always synthesize an ivar. If you need faster access for performance reasons you can always access the synthesized ivar directly too.

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

Sidebar

Related Questions

I feel as though this this is a simple question, but can't find an
I have managed to implement a very basic PDF viewer within my application, but
The Tumblr API supports basic content reading, but I have not yet found a
I have a relatively basic question but more than anything just need some clarity
I'm writing a very basic SDL application, but when I run it through valgrind,
I am sorry for the very newbie question, but this is driving me mad.
I know this may be a basic question, but it is driving me crazy.
This may be a simple question though can´t figure out how to do it.
I am familiar with MVC/MVP though my question is simple, I'm about to program
This question is related to this one , though I think I was a

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.