aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-08-07 11:13:03 +0200
committerGunnar Sletta <gunnar.sletta@jollamobile.com>2014-08-08 06:26:14 +0200
commit232d994d83950a6dc3f237e7d5527730adf95293 (patch)
tree8c1c83ff3636241d6899e469dad094cc25e6d88a /src
parentcdfff96474f9fda3ea1bb1b2580af80c7876d65e (diff)
Make sure texture factories are delete before libraries are unloaded.
Because scene graph adaptations and custom implementations can instantiate QQuickTextureFactories, we need to make sure that their destructors are called before their libraries are unloaded to avoid crashes on shutdown. Change-Id: I17d38e2909aabcb4ea7bf4eecc29df86c8479fdb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 04539800a5..9ae2f5b20d 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1127,6 +1127,13 @@ QQuickWindow::~QQuickWindow()
qDeleteAll(d->afterSwapJobs);
d->afterSwapJobs.clear();
d->renderJobMutex.unlock();
+
+ // It is important that the pixmap cache is cleaned up during shutdown.
+ // Besides playing nice, this also solves a practical problem that
+ // QQuickTextureFactory implementations in other libraries need
+ // have their destructors loaded while they the library is still
+ // loaded into memory.
+ QQuickPixmap::purgeCache();
}
/*!