rhi: Run cleanup callbacks before the pending deletes
If a callback deleteLaters a QRhiResource that should still be handled and not left unreleased. Swap the order. Pick-to: 6.6 6.5 Change-Id: I8419a28a9db5bb59f768ab5820dfaf593464d6d2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>bb10
parent
84873c898c
commit
d907f1aa92
|
|
@ -8069,11 +8069,11 @@ QRhi::~QRhi()
|
||||||
if (!d)
|
if (!d)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
runCleanup();
|
||||||
|
|
||||||
qDeleteAll(d->pendingDeleteResources);
|
qDeleteAll(d->pendingDeleteResources);
|
||||||
d->pendingDeleteResources.clear();
|
d->pendingDeleteResources.clear();
|
||||||
|
|
||||||
runCleanup();
|
|
||||||
|
|
||||||
d->destroy();
|
d->destroy();
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue