Why Doesn't UIWebView release all of its memory?
Posted
by
Theory
on Stack Overflow
See other posts from Stack Overflow
or by Theory
Published on 2010-12-29T06:49:24Z
Indexed on
2010/12/29
6:54 UTC
Read the original article
Hit count: 320
I have a graphic-intensive iPad app that features a UIWebView. Using the simulator (iOS 4.2.1), I can see Real Mem increase quite a lot as I browse. The more I browse, the more RAM it uses. When I close the UIWebView and release it, some of the memory it used is freed, but not all of it. This is annoying. Okay, so maybe it's because it isn't deallocated right away. Fine. But then I would expect the system to do some cleanup when there's a memory warning. However, if I browse around, then close the UIWebView (and release it), then trigger a memory warning in the simulator, Real Mem does not change! WTF?
So why is this? Why isn't UIWebView better at releasing memory back to the system? And why doesn't it appear to respond to memory warnings? Am I missing something?
© Stack Overflow or respective owner