Memory Leak y WebKit 4.5.3 (especially asked to Benjamin Poulain)
-
I was asking this to Benjamin directly but I suppose that doing this here would be better for everybody.
The main thing is that everytime that I load a page with webkit the memory is leaked no matter how I try to remove everything.
I have put this configuration:
@this->_webView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
this->_webView->settings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, false);
this->_webView->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, false);
this->_webView->settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
this->_webView->settings()->setMaximumPagesInCache(0);
this->_webView->settings()->setObjectCacheCapacities(0, 0, 0);this->_webView->history()->setMaximumItemCount(0);@
and this in the destructor
@this->_webView->history()->clear();
delete this->_webView;@but the memory leak is still there, I have seen many post on this but I don't really know if it has been fixed... It's supposed that the bug comes rendering the font but I have noted that the memory loose is so significant...
Do you know where is the bug to fix it and recompile the dll?
Thanks
-
There are way too many things that have changed between 4.5 and 4.7 to know where it has been fixed.
Have you tried valgrind's massif to find where the leak comes from?
You could also bisect webkit to find which patch fixed the leak.
-
[quote author="peppe" date="1294414076"]First, how about using the latest Qt? Second, how do you measure the leak? Valgrind?[/quote]
I normally use valgring but it's pretty easy to note this bug since each load eats near a 1 mb and all my code is perfectly garbage collected ;)
Unit testing all my classes the only loose comes from the one that uses QWebPage after performing a load method.
I'm not using the last version since It actually breaks my code...
-
In 4.6 there should be a similar problem
http://stackoverflow.com/questions/1903193/4-6-qwebview-memory-leaks
So if not solved in 4.7 the bug should be there...
just have a look to this
-
Qt 4.7 has less memory leak than 4.5.3 but still is loosing a lot of memory!!
Since I know thats hard to believe I’m preparing a demo…