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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:34:12+00:00 2026-06-05T22:34:12+00:00

In objective-c whats the difference between using a . and using ->? I’ve used

  • 0

In objective-c whats the difference between using a . and using ->? I’ve used dot notation many times but have only just come across ->

E.G

Object.subObject

or

Object->subObject
  • 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-05T22:34:15+00:00Added an answer on June 5, 2026 at 10:34 pm

    myObject.myProperty

    The dot could either be calling a the getter/setter for a property or accessing a struct.

    In your case subObject is probably not a struct so using myObject.myProperty would be the same as calling the method [myObject myProperty] which is the getter for the "myProperty" property.

    The same way when you are setting a new value using the dot. You are calling [myObject setMyProperty:newValue]; which will do the appropriate memory management defined for your property (like retain, copy or assign the value as well as release the old value).

    (Using getters and setters will also call the work with KVO)


    myObject->myProperty

    The arrow is pointing to the memory of the variable.

    This simply means that you are following the pointer that points to the memory where myProperty is located. This is lower level and does not do any memory management for you, nor does it work with KVO.

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

Sidebar

Related Questions

What is the difference between using self.var vs. just var in an Objective-C class?
Whats the difference between the following pieces of code from objective C stand point?
Whats the best way to get the current time (HH:MM:SS) using Objective-C. I would
In Objective-C what is the difference between defining something (say a property or a
What's the difference between formal and informal protocols in Objective-C?
What is the difference between class and instance methods in Objective-C and when should
I am new to iOS5 development and using objective-c. I have trouble understanding the
What's the difference between a C# Interface and an Objective-C Protocol? I ask because
I just want to know what the difference between all the conditional statements in
What is the difference between Ruby on Rails and Ruby? I have asked four

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.