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

What is the use of controller object UIApplication?

1 Answers  


What is meaning of 'nonatomic' keyword?

0 Answers  


What are the application lifecycle in ios?

0 Answers  


What is retain counts?

0 Answers  


Explain the architecture of iphone? : IOS Architect

0 Answers  






Differentiate between release and pool drain?

0 Answers  


What language is ios based on?

0 Answers  


what are the build phases available in Xcode?

0 Answers  


Name the app sate which it reaches briefly on its way to being suspended in iOS operating system?

0 Answers   TryTechnicals Pvt Ltd,


Enlist frameworks for cocoa?

0 Answers  


How to run xcode and other tools with the iphone sdk?

0 Answers  


Define autorealease pool?

0 Answers  


Categories