Bono Damodi
2016-12-13 16:34:54 UTC
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
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