iOs高内存使用率 [英] iOs high memory usage

查看:117
本文介绍了iOs高内存使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我有一个带有ARC的项目,该项目在推送聊天ViweController(带有自定义单元格的UItableview)时使用了超过6m的内存.我不知道为什么会这样.我最无法确定的原因是它需要太多内存.这是我的Instruments屏幕截图:

Now i 've got a project with ARC, which use over 6m memory on pushing chat ViweController(UItableview with custom cells). I have no idea about why it happening. The most interesting that i cant identify for what reason it needs too much memory. So this is my Instruments screenshot:

在更详细的视图中,它看起来像:

In more detail view it looks like:

我认为libRip.A.dylib需要太多内存.您对此有任何想法吗?

I think libRip.A.dylib needs too much memory. Have you got any ideas about it?

请解释一下什么是奇怪的libRip.A.dylib库?

And please explain me what is and strange libRip.A.dylib library?

推荐答案

libRIP调用负责的绘制带有背景图像的UIViewController.

According to this that libRIP call is responsible for drawing a UIViewController with a background image.

显然,当您使用[UIColor colorWithPatternImage:]设置视图的backgroundColor时,会发生此问题.

Apparently this problem happens when you're setting a view's backgroundColor using [UIColor colorWithPatternImage:].

一种解决方法是改为使用UIImageView作为背景.如此处所述.

A way around it is to use a UIImageView as background instead. As described here.

这篇关于iOs高内存使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆