From: Jerome St-Louis Date: Sat, 7 Jun 2014 07:41:14 +0000 (-0400) Subject: ecere/gui/FormDesigner: Fixed leaking ToolTips X-Git-Tag: 0.44.10PR1~170 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf1386a3120822c191960fca1d0b7c24023b19ef;p=sdk ecere/gui/FormDesigner: Fixed leaking ToolTips - Calling CommonControls' OnDestroy for controls in the form designer --- diff --git a/ecere/src/gui/FormDesigner.ec b/ecere/src/gui/FormDesigner.ec index dd73a6f..67734c2 100644 --- a/ecere/src/gui/FormDesigner.ec +++ b/ecere/src/gui/FormDesigner.ec @@ -802,6 +802,14 @@ static Window FindWindow(Window form, Window window, Window moved, int x, int y, static void OnDestroy(Window window) { FormDesigner designer = activeDesigner ? (FormDesigner)activeDesigner.classDesigner : null; + Class c = window._class; + if(c.base.type != systemClass && c.base.base.type != systemClass) + { + while(c.base.base.base.type != systemClass) + c = c.base; + if(!strcmp(c.fullName, "ecere::gui::CommonControl")) + CommonControl::OnDestroy((CommonControl)window); + } if(designer && designer.form) activeDesigner.DeleteObject(window.object);