UIimageView 动画使用太多内存
我有两个 uiimageview 动画。导航控制器中的两个视图控制器各一个。
每张大约有 10-15 帧。这是我能做的最小的。
但他们似乎使用了大量的内存。特别是在 startAnimating
上。有什么办法解决这个问题吗?
在我的 iPad 上,这导致内存泄漏警告。我尝试过研究它,根据这里的早期问题,我一直在使用大量内存工具等,并将问题范围缩小到 startAnimating 函数。
我读到这是因为在 startAnimating 时 imageView 将所有图像放入内存中。
然而,从超级视图中删除并释放似乎对回收的内存量没有显着影响。
有什么办法解决这个问题吗? Bar 创建自定义 OpenGL 风格动画?
谢谢
I have two uiimageview animations. One on each of two view controllers in a navigation controller.
They have about 10-15 frames each. This is the smallest I can possibly make them.
They seem to be using a hell of a lot of memory though. Especially on startAnimating
. Is there any way around this?
On my iPad this is causing a memory warning an a leak. I've tried looking into it, and as per an earlier question on here I've been using a lot of memory tools and such and narrowed the issue down to the startAnimating function.
I have read that this is because on startAnimating the imageView puts all the images into memory at this point.
However removing from superview and releasing dosen't seem to have a marked effect on the amount of memory reclaimed.
Is there any way around this? Bar creating a custom OpenGL style animation?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
即使我曾经面临同样的问题..我通过使用自定义导航控制器想出了解决方案。现在我没有看到任何内存警告或内存泄漏。
尝试实现您自己的自定义导航控制器。
Even i use to face same Problem.. I came up with solution by using custom navigation controller. Now i don't see any memory warnings or memory leaks.
Try to implement your own custom navigationController.