From: "Rémi Bernon" Subject: Re: [PATCH v5 2/2] server: Do not detach windows if they belong to another thread. Message-Id: <268ae996-4808-2431-ce3d-cb63d7ba6e22@codeweavers.com> Date: Wed, 13 Nov 2019 18:30:24 +0100 In-Reply-To: <20191113103100.6924-2-rbernon@codeweavers.com> References: <20191113103100.6924-1-rbernon@codeweavers.com> <20191113103100.6924-2-rbernon@codeweavers.com> On 11/13/19 11:31 AM, Rémi Bernon wrote: > - detach_window_thread( win ); > + if (win->thread == current) detach_window_thread( win ); > if (win->win_region) free_region( win->win_region ); > if (win->update_region) free_region( win->update_region ); > if (win->class) release_class( win->class ); > Actually this causes some leaks that are reported when server is shutting down, sorry for missing it. This seems to be the case when the thread the child window lives in has terminated already, in which case the parent window should do the release. -- Rémi Bernon