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 is inheritance in objective c?
What is #import?
What are the attributes of category?
Can objective c run on windows?
How to convert string to nsnumber in objective c?
What is an nsobject?
What are the main objectives of training?
What is delegation protocol?
How do you define a protocol?
What is difference between c and objective c?
What is atomic property?
How is string represented in objective-c?