开发者

Best way to figure out why didReceiveMemoryWarning is always getting called on a UIViewController

开发者 https://www.devze.com 2023-01-03 07:06 出处:网络
I have a UIViewController and I\'m noticing that I\'ve done something to where the didReceiveMemoryWarning method is getting called every time I run it on an actual device.

I have a UIViewController and I'm noticing that I've done something to where the didReceiveMemoryWarning method is getting called every time I run it on an actual device.

I've run the project with Run > Run With Performance Tool > Object Allocations (and Leaks also). There are no leaks but I have no idea how to read or understand the "Object Allocations" data that is displayed.

So ...

How do I read t开发者_Python百科his information and what is/are the best ways to figure out (and resolve) why this is happening?

Thanks

EDIT: I should mention that I also have a number of 3rd party libraries/code that I've included in my project (e.g. Three20, MGTwitterEngine, FTUtils, extThree20JSON and Twitter+OAuth). Could this be causing this??? Or at least contributing to the problem?

EDIT #2: Don't know if this helps but I notice that this is happening either everytime that I present a UIImagePickerController modally -OR- after a take a picture using it.

* UPDATE *

Ran it again with the Object Alloc tool for several minutes and I don't see anymore than 4.75MB being allocated at any given moment. The app was running on a device and typically with 2.5 MB allocated on average.

Does this seem problematic to anyone??? Seems like its in an acceptable range insofar as I understand thing.


This may happen some time when your device have less memory free to use. Check your device free memory.


The problem had to do with UIImagePickerController ... and all is answered in this post: Received memory warning. Level=1 when showing a UIImagePickerController

0

精彩评论

暂无评论...
验证码 换一张
取 消