diff options
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index 628619fa46..66add51c55 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -73,6 +73,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, struct QSGAdaptationBackendData { QSGAdaptationBackendData(); + ~QSGAdaptationBackendData(); + Q_DISABLE_COPY(QSGAdaptationBackendData) bool tried = false; QSGContextFactoryInterface *factory = nullptr; @@ -91,6 +93,11 @@ QSGAdaptationBackendData::QSGAdaptationBackendData() builtIns.append(new QSGSoftwareAdaptation); } +QSGAdaptationBackendData::~QSGAdaptationBackendData() +{ + qDeleteAll(builtIns); +} + Q_GLOBAL_STATIC(QSGAdaptationBackendData, qsg_adaptation_data) // This only works when the backend is loaded (contextFactory() was called), |