开发者

Memory consumed by an object during its lifetime

开发者 https://www.devze.com 2023-01-02 13:11 出处:网络
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 u

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

0

精彩评论

暂无评论...
验证码 换一张
取 消