小编sha*_* li的帖子

UIWebView导致内存泄漏

我的项目是一个混合静态库,用于显示带有一些JS来控制逻辑的UIWebView.当我在iOS 8/iPhone 6上使用64位并运行demo时,内存将保持在30M或更高!

  1. 当我在仪器中使用生成时,增加的内存使用几乎全部来自webcore; 这是否意味着JS代码中存在泄漏?当我使用Safari直接运行类似的JS时,我找不到泄漏.

  2. 当我发布UIWebView时,内存仍然没有被释放; 我用仪器分配测试了.内存中还有一些webcore和(非对象),我可以做些什么来释放它们?

    • 0JavaScriptCore WTF :: MallocHook :: recordAllocation(void*,unsigned long)
    • 1 JavaScriptCore WTF :: fastMalloc(unsigned long)
    • 2 WebCore WebCore :: SharedBuffer :: buffer()const
    • 3 WebCore WebCore :: SharedBuffer :: data()const
    • 4 WebCore WebCore :: ResourceLoader :: didReceiveDataOrBuffer(char const*,unsigned int,WTF :: PassRefPtr,long long,WebCore :: DataPayloadType)
    • 5 WebCore WebCore :: SubresourceLoader :: didReceiveDataOrBuffer(char const*,int,WTF :: PassRefPtr,long long,WebCore :: DataPayloadType)
    • 6 WebCore WebCore :: SubresourceLoader :: didReceiveBuffer(WTF :: PassRefPtr,long long,WebCore :: DataPayloadType)
    • 7 WebCore WebCore :: ResourceLoader :: didReceiveBuffer(WebCore …

memory uiwebview dealloc

7
推荐指数
1
解决办法
4242
查看次数

标签 统计

dealloc ×1

memory ×1

uiwebview ×1