Name the memory management rules and their related methods.



Name the memory management rules and their related methods...

Answer / maanya

The object you created is owned by you by allocating memory for it, or is owned by you by copying it.
Related Methods: alloc, allocWithZone, copy, copyWithZone, mutableCopy, mutableCopyWithZone.
If you are not the creator of an object but you want it to stay in memory, you can express an ownership interest.
Related Methods: retain.
If you created or expressed ownership interest on an object, and now you are its owner, then you are responsible to release it once you don't need it anymore.
Related Methods: release, autorelease.
If you are not the owner of an object (you did not created it or did not expressed ownership interest) then you must not release it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

Explain about NSURL Connection Delegates

1 Answers  


What is @synthesize in objective-c ?

0 Answers  


What is latest ios version?

0 Answers  


Will iphone 6 get ios 13?

0 Answers  


Define cocoa?

0 Answers  






What are the sorts of ios binaries you can make utilizing xcode?

0 Answers  


What is categories in iOS?

0 Answers   UGC Corporation,


What is uiviewcontroller in ios?

0 Answers  


Explain app id?

0 Answers  


Explain usage of struct?

0 Answers  


What is the difference between 'assign' and 'retain' keyword?

0 Answers  


What are the features of iphone 3gs?

0 Answers  


Categories