The scenegraph renderer and root node were not cleaned up when all other
SG nodes are. This leads to a possible case where the SG nodes
regenerate for the canvas without being properly linked to the renderer.
Task-number: QTBUG-23571
Change-Id: I19084af998cb7482bfddc87770ee9b5e0aad3a6c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
// This must be called from the render thread, with the main thread frozen
void QQuickCanvasPrivate::cleanupNodesOnShutdown()
{
+ Q_Q(QQuickCanvas);
cleanupNodes();
cleanupNodesOnShutdown(rootItem);
QSet<QQuickItem *>::const_iterator it = parentlessItems.begin();
for (; it != parentlessItems.end(); ++it)
cleanupNodesOnShutdown(*it);
+ q->cleanupSceneGraph();
}
void QQuickCanvasPrivate::updateDirtyNodes()