What happens if you add your just created object to a mutable array, and you release your object?
Answer / Sanjeev Suman
When you add a newly created object to a mutable array and then release the object, the retain count of the object becomes 1 (because the array retains it). However, since you've also released it manually, its retain count will eventually reach zero, and it will be deallocated, causing the object to disappear from the array.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the main objectives of training?
Can we create dynamic classes in objective c?
When might you use a cfarray/dictionary instead of a nsarray/dictionary?
What is nsarray objective c?
What are the different types of protocols?
What is difference between method and constructor?
How to call function?
What does mean in objective c?
What is difference between null and nil?
Can you retain delegates?
Tell us the result when you invoke a particular method on a nil pointer?
Can you learn swift without knowing objective c?