Explain retain counts
Answer / maanya
.
Retain counts are the way in which memory is managed in Objective-C. When you create an object, it has a retain count of 1. When you send an object a retain message, its retain count is incremented by 1. When you send an object a release message, its retain count is decremented by 1. When you send an object a autorelease message, its retain count is decremented by 1 at some stage in the future. If an objectʼs retain count is reduced to 0, it is deallocated.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the different delete rules that a relationship can have? Which one takes ownership?
Difference between ScrollviewdidScroll and didendDecelerating delegates?
How to start a selector on a background thread.
Define 'retain' keyword?
What is block in ios objective c?
What is mvp in ios?
What is difference between category and extension in ios?
What is nonatomic in ios?
What is automatic reference counting (arc)?
What is xcode used for?
What is difference between synchronous and asynchronous in web request in iOS operating system?
What is the ? In swift?