diff options
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 2b69d97..7aa3a40 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -344,12 +344,15 @@ class NetworkAccessManagerFactory : public QmlNetworkAccessManagerFactory { public: NetworkAccessManagerFactory() : cookieJar(0), cacheSize(0) {} + ~NetworkAccessManagerFactory() { + delete cookieJar; + } QNetworkAccessManager *create(QObject *parent) { QMutexLocker lock(&mutex); QNetworkAccessManager *manager = new QNetworkAccessManager(parent); if (!cookieJar) - cookieJar = new PersistentCookieJar(manager); + cookieJar = new PersistentCookieJar(0); manager->setCookieJar(cookieJar); cookieJar->setParent(0); setupProxy(manager); |