在 UIWebView 中加载 NSURLRequest - 堆不断增长
我有一个简单的 UIWebView,每次单击按钮时都会加载 NSURLRequest。使用 Instruments 并分析堆快照,我注意到我的堆在不断增长。然而,这些物品似乎都不是我自己的,因为它们都<<。非对象> WebCore 字形的东西。 每次分配/释放 UIWebView 时,我都会看到大约 40kB 的堆增长,即使在 10 次以上的堆快照之后也是如此。
为什么这些对象仍然存在于内存中,我该怎么办?
I've got a simple UIWebView loading an NSURLRequest every time a button is clicked. Using Instruments and analyzing heapshots, I'm noticing that my heap is continuously growing. However, none of the objects seem to be my own, as they are all < non-object > WebCore glyph stuff.
I'm seeing an increase of roughly 40kB heap growth each time the UIWebView is allocated/deallocated, even after 10+ heap shots.
Why do these objects still exist in memory, and what can I do about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有设法让堆停止为每个连续的
-loadRequest:
增长。然而,我确实注意到后来活动字节急剧减少,这表明分配的字节最终被清除。I did not manage to not make the heap stop from growing for each successive
-loadRequest:
. However, I did notice a drastic decrease in live bytes later on, suggesting that the allocated bytes are cleared out eventually.