[webkit-help] Memory Leak in QtWebKit

Fred Lee fred.lee at zetakey.com
Sat Mar 3 01:28:57 PST 2012

Dear Eric,

I am not using QT, but usually, i would disable the PageCahce or set it 
to a very small number to limit the memory used by the CahcedResources, 
especially in some of the limited memory platform.



On 2/29/2012 11:53 AM, 陳敏華 wrote:
> Dear all
> I'd like to ask you question about memory leak in Webkit. Currently, I am using
> QtWebkit self contained in Qt 4.8.0, and my test application is like follows:
> int main(int argc, char *argv[])
> {
>      QApplication a(argc, argv);
>      QWebView* view = new QWebView();
>      view->load(QUrl("http://www.baidu.com"));
>      view->show();
>      a.exec();
>      delete view;
>      return 0;
> }
> As you know, Webkit provide RefCountedLeakCounter class to detect memory leak. When I run this test application in debug mode, I have noticed that many WebCoreNodes and CachedResource have leaked. This leak could be a big problem because we want to make use of WebKit in embedded device.
> So, I'd like to ask you all whether this memory leak real or not? I just can't believe Webkit would leak memory in such a simple test, or if Webkit provides some other mechanism to ensure memory will not be leaked, please tell me.
> Can anyone provide some information about this problem? I really appreciate your help.
> Best Regards
> Eric Chen
> ---------------------------------------------------
> Chen Minhua
> Development Dept.III
> Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
> No. 6 Wenzhu Road, Nanjing, 210012, China
> TEL: 86630566-615
> COINS: 79955-615
> FAX: 83317685
> MAIL: chenmh at cn.fujitsu.com
> ---------------------------------------------------
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

More information about the webkit-help mailing list