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. Change-Id: I8419a28a9db5bb59f768ab5820dfaf593464d6d2 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit d907f1aa92dbd4500a18db2c2492491c34c66087) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
618abdcd80
commit
4595ad68a9
@ -7904,11 +7904,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…
x
Reference in New Issue
Block a user