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 |
What is the maximum byte-size for a push notification to apple server?
Does ios have garbage collection?
What is a weak var?
What are the steps you must follow to configure your computer and development device for iphone development?
How do I create a class in xcode?
What is plist?
Which app specific objects store the app's content in iOS operating system?
0 Answers TryTechnicals Pvt Ltd,
Define 'weak' keyword?
What is cocoa touch framework in ios?
Can a "delegate" retained in ios?
Define ipa?
What is array in ios?