Pointers

In Objective C all objects are referenced using pointers:

A pointer is a variable which stores memory address instead of value itself.

how big is int, 4 bytes
how big is char, 1 byte
how big is String, image or video?  we often don’t know and it might even change during our program so we need more flexible way to manage objects and pointers are one way of allowing us to do that.

Using pointers allows us to pass around the objects (just by passing around the address of object) without having need to copy them which is time consuming and inefficient  

E.g.   NSString* welcomeString;
         NSDate* todayDate;

welcomeString = @“Welcome to Objective C”;

Here the string 'Welcome to Objective C’ string is not directly stored in ‘welcomeString’ instead the address/memory location of 'Welcome to Objective C' is stored in ‘welcomeString which is contrary to 'int highScore = 100’ where ‘highScore’ variable directly stores value. ( this is because objects are more complex than primitive types)

if you want to make and use of simple object, we need pointers to reference them.
Note: Explicit use of pointers in Swift is not required unlike Objective C. e.g let someInstance = SomeClass ( ) whereas in objective C it is SomeClass *someInstance = [SomeClass alloc] init];

47 comments:

  1. Awesome article I really impress it’s very informative and useful.Thanks

    Custom Software Development Australia

    ReplyDelete
  2. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune
    Data science training in kalyan nagar
    Data science training in Bangalore
    Data science training in tambaram

    ReplyDelete
  3. I always enjoy reading quality articles by an individual who is obviously knowledgeable on their chosen subject. Ill be watching this post with much interest. Keep up the great work, I will be back
    Devops training in Chennai
    Devops training in Bangalore
    Devops Online training
    Devops training in Pune

    ReplyDelete
  4. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..
    java training in chennai | java training in bangalore

    java online training | java training in pune

    selenium training in chennai

    selenium training in bangalore

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    angularjs Training in chennai

    angularjs Training in bangalore

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

    angularjs-Training in velachery

    ReplyDelete
  7. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    python training in rajajinagar
    Python training in btm
    Python training in usa
    Python training in marathahalli

    ReplyDelete
  8. After seeing your article I want to say that the presentation is very good and also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
    python training in velachery
    python training institute in chennai

    ReplyDelete
  9. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
    Best Devops Training institute in Chennai

    ReplyDelete
  10. Amazon has a simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web. Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow.For more information visit.
    aws online training
    aws training in hyderabad
    aws online training in hyderabad

    ReplyDelete
  11. You have a good point here! I totally agree with what you have said!! Thanks for sharing your views...hope more people will read this article!!
    iPhone App Development India

    ReplyDelete
  12. You have made a really good point over here as this helped me in my approach in a project related with application support services in USA
    . Your blog is really nice because it always helps a lot.

    ReplyDelete
  13. Thanks for sharing the amazing post.It is very much informative. I am very eager to read your upcoming post.
    Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  14. Well explained thanks for sharing your valuable blog its very good.
    Best iPhone Service Center in Chennai


    ReplyDelete
  15. Thanks for sharing such a useful and informative post like this. Keep updating more updates like this.
    Apple iPhone Service Center in Chennai Anna Nagar

    ReplyDelete
  16. Thanks for sharing such a great blog Keep posting..
    AWS Training in Gurgaon
    Thanks for sharing such a great blog Keep posting..
    AWS Course in Gurgaon

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. Replies
    1. This comment has been removed by the author.

      Delete
  19. This is more helpful for find best topxlisting company .

    ReplyDelete
  20. You ought to be a part of a contest for one of the most useful sites on the internet. I most certainly will highly recommend this website!

    ReplyDelete
  21. wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.

    AWS training in chennai | AWS training in anna nagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. This comment has been removed by the author.

    ReplyDelete
  24. This comment has been removed by the author.

    ReplyDelete
  25. This comment has been removed by the author.

    ReplyDelete
  26. I’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Thanks!!Nice Article. I am really enjoying while studying this article. really the Article is very Impressive.
    Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  27. You post is very informative and contents are outstanding. Thanks for sharing such useful info.

    Zikia | OJOPLUS | Best Immune Booster Tablets in India

    ReplyDelete
  28. Infycle Technologies, the top software training institute and placement center in Chennai offers the Best Digital Marketing course in Chennai for freshers, students, and tech professionals at the best offers. In addition to Digital Marketing, other in-demand courses such as DevOps, Data Science, Python, Selenium, Big Data, Java, Power BI, Oracle will also be trained with 100% practical classes. After the completion of training, the trainees will be sent for placement interviews in the top MNC's. Call 7504633633 to get more info and a free demo.

    ReplyDelete
  29. Thanks for posting such grateful information. It's pretty nice and very helpful contents in this article.


    Sojat Henna Powder Suppliers in India | Henna Powder Suppliers in India

    ReplyDelete