iPhone 应用程序使用 150 MB 内存,仍然没有低内存警告! [英] iPhone app uses 150 MB memory and still no low memory warning!

查看:11
本文介绍了iPhone 应用程序使用 150 MB 内存,仍然没有低内存警告!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题应用程序,基于导航,我每次都从笔尖创建并推送我的表格视图.没有泄漏,仪器中的实时字节似乎约为 2-3 MB.

I have a questionary application, navigation based which I create and push my tableviews eachtime from a nib. there is no leakage and in instruments live bytes seems around 2-3 MB.

我在真实设备(越狱的 IOS4 iPhone)中进行了测试,当我深入导航(大约 200 个页面推送)时,我可以看到内存使用量高达 150 MB!当我导航回根目录时,它们都被释放了,但这不是一种奇怪的行为吗?(每个 nib 视图大约 800 KB,其中没有大数据或图像)

I tested in real device (jailbroken IOS4 iPhone), when I go through deep in the navigation (around 200 page pushes) I can see that memory usage goes upto 150 MB! when I navigate back to root then they are all freed, but isnt this a weird behavior? (around 800 KB for each nib view and no big data or images in it)

最奇怪的是,我在 didreceivememorywarning 和 didunloadview 方法中放了一些警报,却没有收到任何内存警报!

The most weird thing is, I put some alerts to didreceivememorywarning and didunloadview methods, and yet didnt receive any memory alerts!

-为什么即使应用程序使用 150 MB 或更多内存,我也从未收到任何内存警告和 viewDidUnload?-应用程序可以工作,但这种内存使用对 Apple 商店来说是个问题吗?

-Why I never get any memory warning and viewDidUnload even the app uses 150 MB and more of memory? -Application works but is this memory usage a problem for Apple store?

推荐答案

我只是在 viewDidDisappear 方法中添加 self.view=nil ,它可以工作并且我可以恢复,现在好多了.tnx Felz 寻求帮助

I just add self.view=nil in viewDidDisappear method, it works and I can recover back, much better now. tnx Felz for the help

这篇关于iPhone 应用程序使用 150 MB 内存,仍然没有低内存警告!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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