开发者

What are live bytes?

I have an app that holds a lot of pictures and when the user browses them the live bytes in my app gets to max 88 mb.

fi开发者_Go百科rstly what does that me, The app doesnt crash, it gets a little slower. but is that 88mb in memory ?

Secondly I have a UIView which I set its view to an image depending on the number in the counter. Is there a way to release that previous image or at least only to keep 5 images in memory and release the rest ? e.g. keep -2 -1 0 1 2 , when 3 is called, release -2.

thanks


Secondly I have a UIView which I set its view to an image depending on the number in the counter. Is there a way to release that previous image or at least only to keep 5 images in memory and release the rest ? e.g. keep -2 -1 0 1 2 , when 3 is called, release -2.

Take a look at the push and pop method additions to NSMutableArray which are posted in a separate Stack Overflow question on containers. This would let you add and remove from the head and tail of a mutable array of UIView references.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜