Difference between retain and assign ?
Answer / 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 |
What is ios viewwillappear?
Explain the difference between strong and retain.
Which are the app’s state transitions when it is launched?
What is message forwarding?
Why do we override drawrect: method?
What does use core data mean in xcode?
Does ios supports multi-tasking functionality?
What is the 'interface' and 'implementation'?
Explain your process for tracing and fixing a memory leak
What is variable in ios?
Explain keywords alloc and new?
What is the difference between viewdidload and viewdidappear?