Answer Posted / babu
Assign and retain was used in manual memory management (MRC) environment.
assign to set a property’s pointer to the address of the object without retaining it. use weak to have the property point to nil automatically if the object assigned to it is deallocated .
Use retain by default and will manage the object’s reference count automatically whether another object is assigned to the property or it’s set to nil; In ARC you will use strong instead of retain.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Please explain what is difference strong and weak reference?
What is the difference between cocoa and cocoa touch?
What is the difference between let and var in swift?
Why do you generally create a weak reference when using self in a block?
What is nspersistentstore? Is it thread safe?
What are design patterns in ios?
How to parse xml?
What is bundle id?
What is a delegate xcode?
Ellaborate viper architecture?
What is synchronous vs. Asynchronous in gcd ?
Why is iboutlet weak?
How we can do multithreading in ios?
What is nspersistentstorecoordinator? What duties does it perform?
Explain what is storyboard?