From 0749f8cbdf5f7d95a92c738ce5294572d0018307 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 4 Dec 2024 13:25:05 +0100 Subject: [PATCH] wm: free content view IDs if decorator disappears This patch fixes the following error message printed by the wm upon the restart of a decorator. Error: freeing non-empty slab block" Error: ID space not empty at destruction time Fortunately, the error is not critical as the backing store is released along with the session. --- repos/gems/src/server/wm/decorator_gui.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/gems/src/server/wm/decorator_gui.h b/repos/gems/src/server/wm/decorator_gui.h index 43ad1fe9d6..067606c2dc 100644 --- a/repos/gems/src/server/wm/decorator_gui.h +++ b/repos/gems/src/server/wm/decorator_gui.h @@ -131,6 +131,12 @@ struct Wm::Decorator_gui_session : Session_object, _input_session.sigh(_input_handler); } + ~Decorator_gui_session() + { + while (_content_view_ids.apply_any([&] (Content_view_ref &view_ref) { + destroy(_content_view_ref_alloc, &view_ref); })); + } + void upgrade_local_or_remote(Resources const &resources) { _upgrade_local_or_remote(resources, *this, _real_gui);