From a374c6ab84615e14a8f5d38f8844ae11524226b0 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 8 Apr 2024 15:02:55 +0200 Subject: [PATCH] Root: fix leak on view destroy This leaks memory and possibly an fd currently whenever a view is destroyed. --- river/Root.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/river/Root.zig b/river/Root.zig index 731c0e6..a33bf63 100644 --- a/river/Root.zig +++ b/river/Root.zig @@ -725,6 +725,7 @@ fn commitTransaction(root: *Root) void { // This must be done after updating cursor state in case the view was the target of move/resize. var it = root.hidden.inflight.focus_stack.safeIterator(.forward); while (it.next()) |view| { + view.dropSavedSurfaceTree(); if (view.destroying) view.destroy(); } }