diff -r 15bf7259bb7c -r d8a3531bc6b8 uiacceltk/hitchcock/coretoolkit/src/HuiControlGroup.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiControlGroup.cpp Tue Feb 02 07:56:43 2010 +0200 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiControlGroup.cpp Mon Feb 22 17:57:49 2010 +0200 @@ -48,22 +48,29 @@ CHuiControlGroup::~CHuiControlGroup() - { - iUnhandledEventObservers.Close(); + { + + + iEnv.RemoveTheControlGroup(iResourceId); - // The group owns the controls, so it must destroy them. - // Destroy in reverse order so that references will be removed in - // natural order (children of a pane will be removed before the pane). - for(TInt i = iControls.Count() - 1; i >= 0; --i) - { - CHuiControl* c = iControls[i]; - iControls.Remove(i); - delete c; - } - iControls.Reset(); + iUnhandledEventObservers.Close(); + + // The group owns the controls, so it must destroy them. + // Destroy in reverse order so that references will be removed in + // natural order (children of a pane will be removed before the pane). + for(TInt i = iControls.Count() - 1; i >= 0; --i) + { + CHuiControl* c = iControls[i]; + iControls.Remove(i); + delete c; + } + iControls.Reset(); + + delete iTransform; + iTransform = NULL; + HUI_PROBE_REPORT_DESTRUCTED + - delete iTransform; - HUI_PROBE_REPORT_DESTRUCTED }