View: add more assertions around destruction

This should make leaks like the one fixed by the previous commit harder
to write.
This commit is contained in:
Isaac Freund
2024-04-08 15:18:12 +02:00
parent a374c6ab84
commit 94828474b0
4 changed files with 12 additions and 6 deletions

View File

@ -726,7 +726,7 @@ fn commitTransaction(root: *Root) void {
var it = root.hidden.inflight.focus_stack.safeIterator(.forward);
while (it.next()) |view| {
view.dropSavedSurfaceTree();
if (view.destroying) view.destroy();
if (view.destroying) view.destroy(.assert);
}
}