How to find the size of any object in iOS?

前端 未结 5 1857
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-23 12:45

I was optimizing my app and wanted to know that how much is the size of the object, so that I can also show it in log.

suppose I have

NSDictionary *t         


        
5条回答
  •  天涯浪人
    2020-12-23 13:03

    Variable temp is a memory address. We can not get the object memory size by programming. We can use the Allocations instrument to optimize app in xcode. Click Command+I in xcode4, you can find it.

提交回复
热议问题