[webkit-help] How to clear memory held by QtWebkit?
Bono Damodi
probablynotthebestone at gmail.com
Tue Dec 13 08:34:54 PST 2016
Hello,
is there a way to deinitialise QtWebkit in runtime completely? For example
for this code:
#include <QApplication>
#include <QGraphicsWebView>
#include <QUrl>
#include <QTimer>
QGraphicsWebView* graphicsWebView;
class Deleter : public QObject
{
Q_OBJECT
public slots:
void deleteWebView()
{
delete graphicsWebView;
}
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
graphicsWebView = new QGraphicsWebView;
graphicsWebView->setUrl(QUrl("http://www.google.com"));
Deleter d;
QTimer::singleShot(10000, &d, SLOT(deleteWebView()));
return app.exec();
}
#include "main.moc"
After deleting graphicsWebView object there is still used about 2mb of
physical memory (more than 6 mb of virtual memory) by Webkit's OSAllocator
(I tracked mmap's calls by OSAllocator and then correlated with
/proc/pid/smaps). Much of the memory seems to be requested
by JSC::JIT::compile function.
Is there some way to completely clean QtWebkit after it was initialised?
This is Qt 4.8
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-help/attachments/20161213/1628c81a/attachment.html>
More information about the webkit-help
mailing list