UIWebView leaks, JS Garbage Collector & WebCore VMs

后端 未结 1 1553
温柔的废话
温柔的废话 2021-02-07 02:15

I\'ve been building a browser feature for an app which obviously works with UIWebView. I\'ve been seeing memory jump up when the browser opens which makes sense, however i\'m se

相关标签:
1条回答
  • 2021-02-07 02:56

    I'm unsure if I would immediately consider this a problem. Those VMs only start when you add a web view to your view hierarchy and load a request with it.

    It may just be the OS that keeps those resources alive in case they will be used again.

    I tried to replicate your code that cleans up the data and had drops of 50%.

    The JS Garbage collector was always at around 3MB minimum, but had maximums of 8MB The WebCore purgeable data was always at around 700KB

    You may also consider that this may be related to bad JavaScript that continues to live because of leaks in the JavaScript code.

    0 讨论(0)
提交回复
热议问题