diff --git a/src/graphs/qml/qquickgraphsbars.cpp b/src/graphs/qml/qquickgraphsbars.cpp index c6a1cc29..562f8aff 100644 --- a/src/graphs/qml/qquickgraphsbars.cpp +++ b/src/graphs/qml/qquickgraphsbars.cpp @@ -1129,6 +1129,9 @@ void QQuickGraphsBars::updateBarVisuals(QBar3DSeries *series) QColor barColor; if (m_barsController->optimizationHints() == QAbstract3DGraph::OptimizationLegacy) { + // Release resources that might not have been deleted even though deleteLater had been set + window()->releaseResources(); + if (!rangeGradient) { for (int i = 0; i < barList.count(); i++) { QQuick3DModel *model = barList.at(i)->model; diff --git a/src/graphs/qml/qquickgraphsscatter.cpp b/src/graphs/qml/qquickgraphsscatter.cpp index 356f3abf..4f62c3fc 100644 --- a/src/graphs/qml/qquickgraphsscatter.cpp +++ b/src/graphs/qml/qquickgraphsscatter.cpp @@ -233,6 +233,8 @@ void QQuickGraphsScatter::updateScatterGraphItemVisuals(ScatterModel *graphModel == Q3DTheme::ColorStyleRangeGradient) ? true : false; if (m_scatterController->optimizationHints() == QAbstract3DGraph::OptimizationLegacy) { + // Release resources that might not have been deleted even though deleteLater had been set + window()->releaseResources(); if (itemCount != graphModel->dataItems.size()) qWarning() << __func__ << "Item count differs from itemList count";