内存泄漏 - 应用程序在 iPhone 应用程序中退出并显示信号 9
我有一个应用程序,它通过使用 UIImageView、创建图形上下文、调用 Web 服务、使用quartz2d 绘图、混合图像、播放视频、录制等来占用大量内存。但现在应用程序在一段时间后退出并出现内存警告。 有什么方法可以清除内存使用情况,例如清除缓存或类似的东西。
I have an application which is utilizing a lot of memory by using UIImageView, creating graphics context, calling web service, drawing using quartz2d, blending images, playing video, recording and so on. But now the application is exiting after some time with a memory warning.
Is there any way to clear the ram usage like clear cache or something like that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先从目录中删除构建文件夹,然后清理所有目标,然后转到菜单构建
然后构建并分析并解决潜在的泄漏。
完成此操作后,您应该通过仪器运行应用程序并查看内存泄漏发生的位置
然后尝试解决它。
First of all delete build folder from your directory,then clean all targets,then go to menu Build
then Build and Analyze and solve the potential leaks.
After doing this you should run your application through instruments and see where memory leak occures
and then try to solve it.
您可以做一件事,将您的应用程序放在泄漏分析器上,检查泄漏,然后在检查代码并释放分配的对象之前,在这些使用完成后,通过释放它们。
这是一个很好的教程。 http://mobileorchard.com/find-iphone-memory-泄漏-a-泄漏-工具-教程/
You, can do one thing, put your application on leaks analyzer, and check out the leaks, and prior you go through your code and release, the allocated objects after those use have finished, by releasing them.
Here is a good tutorial. http://mobileorchard.com/find-iphone-memory-leaks-a-leaks-tool-tutorial/