Who calls dealloc method? Can we implement dealloc in arc?
Answer / Kaleem Salahuddin
The dealloc method is called by the Objective-C runtime when an object is about to be deallocated. However, in ARC (Automatic Reference Counting), you do not need to explicitly call dealloc. Instead, ARC takes care of memory management for you. You can still implement the dealloc method to perform custom cleanup operations if needed, but it will only be called when ARC determines that the object's retain count reaches zero.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a selector objective c?
How do you add a category in objective c?
What is struct in objective c?
Explain the difference between uiwindow and uiview?
How to call objective c function in swift?
What is category in objective c?
Explain when to use nsarray and nsmutablearray. Which one is faster and threadsafe?
What is the class of a constant string?
When will you use nsarray and nsmutablearray? Which one is faster?
Tell me about important protocol being used in objective c?
What is difference between objective c and c?
Are id and instancetype same? If not, what are differences between them?