UIImagePickerController 内存警告
当有许多数据广泛的应用程序在后台运行时(有时没有),每当我呈现 UIImagePickerController 时,我都会收到内存警告,通常在 1 到 2 之间。我确信这不是我的代码,因为我收到的内存警告为一旦相机视图出现。我将 UIImagePickerController 的实例保留在应用程序委托中(在阅读了无数文章之后)。有人有什么建议吗?
When having many data extensive apps running in the background (sometimes none), whenever I present the UIImagePickerController, i get a memory warning, usually between 1 and 2. I'm sure its not my code, because it i recieve that memory warning as soon as the camera view is presented. I'm keeping my instance of the UIImagePickerController in the app delegate (after reading countless articles). Anyone have any advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
内存警告不一定是错误的迹象。调出图像选择器会占用内存。如果您的电量已经不足,则会触发警告。 。听起来您需要更加小心环境内存管理?或者确保在启动选择器之前转储资源。
A memory warning isn't a sign of a bug necessarily. Bringing up the image picker uses memory. If you're already running low, it'll trigger a warning. . Sounds like you need to be a little more careful with your ambient memory management? Or make sure you dump resources before you bring up the picker.
是的,内存警告发生了。在应用程序开始被杀死之前,不要为此大惊小怪。即使如此,只有当前台应用程序被杀死时,这才是真正的问题。
当然,这并不能免除您必须尽可能节约资源的义务——但有时却没有办法解决这个问题。
Yeah, memory warnings happen. Don't fuss about it until apps start getting killed. Even then, it's only really a problem when the foreground app gets killed.
Of course, this doesn't discharge you from having to be as frugal with resources as you can - but sometimes there's just no way around it.