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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
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.