Commit 8accc777 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix memory leak in some plasma components

A few plasma components cache QSGTexture. Those components rely on
texture references going away with QSGNode users. However, with the
current tear down logic, OffscreenQuickView won't destroy any paint

Destroy QQuickRenderControl before QQuickWindow to ensure that are no
paint nodes left alive after OffscreenQuickView.

BUG: 444429
BUG: 444381
BUG: 444077
BUG: 444306
(cherry picked from commit 64f2cdf9)
parent 77b678c5
......@@ -160,13 +160,15 @@ EffectQuickView::EffectQuickView(QObject *parent, QWindow *renderWindow, ExportM
if (d->m_glcontext) {
// close the view whilst we have an active GL context
delete d->m_view;
d->m_view = nullptr;
delete d->m_renderControl; // Always delete render control first.
d->m_renderControl = nullptr;
delete d->m_view;
d->m_view = nullptr;
bool EffectQuickView::automaticRepaint() const
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment