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.
This commit is contained in:
Norman Feske 2024-12-04 13:25:05 +01:00 committed by Christian Helmuth
parent 1ddbb3444c
commit 0749f8cbdf

View File

@ -131,6 +131,12 @@ struct Wm::Decorator_gui_session : Session_object<Gui::Session>,
_input_session.sigh(_input_handler);
}
~Decorator_gui_session()
{
while (_content_view_ids.apply_any<Content_view_ref>([&] (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);