Does the tool use the memory used by UIWebView?

I have an application that works well on the iPhone 4, 2nd generation iPod Touch, iPhone 3G, but it crashes on the 4th generation iPod Touch systematically after 2 or 3 memory warnings. I tested it in Tools and it tells me that the application is using 2 MB when sending a warning about memory. This seems to be a very small amount of memory.

I suspect the problem is with the UIWebView and I wander if the tools actually show the amount of memory used by the UIWebView. 2MB is not enough to generate memory alerts in previous applications that I worked on.

This is not a leak in UIWebView, as I sometimes experience a crash when I display a UIWebView.

+6
source share
1 answer

Try the following:

  • Select "Calls" above the list (default is "Statistics")
  • Check the box "Invert call tree" + "Hide system library" + "Show only OBJ-C"

Now you can view calls that are still in memory in ascending order. They are not objects, but you should be able to see your selector, which calls your UIWebView. If you do not create it programmatically instead of IB, then it will be displayed for sure.

Also try checking leaks first and use ARC if you can.

+2
source

Source: https://habr.com/ru/post/914973/


All Articles