Memory consumed by an object during its lifetime
How can i trace memory consumed by an object in its life time when i am testing开发者_开发知识库 my application on device? [e.g.: without any instruments if possible]
One way to accomplish this is to use NSKeyArchiver. You can serialize your object out and then determine it's size. This will would limit the type of data your object can hold. You can check out the docs here:
http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/Archiving/Archiving.html#//apple_ref/doc/uid/10000047i
精彩评论