Name the memory management rules and their related methods.
Answer Posted / 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 View All Answers
What are the features is ios 6?
What is difference between delegate and datasource in ios?
Are ios developers in demand?
How we can do multithreading in ios?
Explain how do I get a call when my ipad rings?
What are the app states in ios?
What is difference between nsnotification and delegate?
How would you create your own custom view in iOS operating system?
Describe the functionality of accelerometer of an iphone ?
What is difference between mvc and mvvm in ios?
Define decoding or deserialization and encoding or serialization?
What is ios application?
What is latest mac os version?
Differentiate 'app id' from 'bundle id'.
Explain app's state transitions when it gets launched?