Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

ivar

Property vs. ivar in times of ARC

April 9, 2023 by Tarik

If a variable: Is declared in a class using ARC. Is used solely for class implementation (not exposed as part of the class interface). Does not require any KVO. Does not require any custom getter/setter. Then it is appropriate to declare it as an ivar without a corresponding @property/@synthesize, and to refer to it directly … Read more

Categories objective-c Tags automatic-ref-counting, ivar, objective-c, properties Leave a comment

Why would you use an ivar?

November 18, 2022 by Tarik

Encapsulation If the ivar is private, the other parts of the program can’t get at it as easily. With a declared property, the clever people can access and mutate quite easily via the accessors. Performance Yes, this can make a difference in some cases. Some programs have constraints where they can not use any objc … Read more

Categories objective-c Tags ios, ivar, key-value-observing, memory-management, objective-c Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa