Google News
logo
IOS - Interview Questions
What is the difference between strong, weak, read-only, and copy in iOS?
Strong : Through the life of the object, the reference count will be increased and the reference will be maintained

Weak : It can be said as a non-strong reference that means it refers to the fact that we are referring to an object but not adding to its reference count. It’s often used to establish a parent-child relationship. The parent has a strong connection with the infant, but the child has only a small connection with the parent.

Read-only : Initially, The property will be set and it can’t be changed.

Copy : It means that when an object is created, we’re copying its value. Also prevents its value from changing.
Advertisement