fix memory leak on ContextMenuItem
authorPark Kyoung Hee <kh1979.park@samsung.com>
Fri, 28 Jun 2013 13:06:27 +0000 (22:06 +0900)
committerPark Kyoung Hee <kh1979.park@samsung.com>
Fri, 28 Jun 2013 13:09:42 +0000 (22:09 +0900)
Change-Id: I49a7f79805cd2940344ad17bc247e4ba764c8562
Signed-off-by: Park Kyoung Hee <kh1979.park@samsung.com>
src/ui/controls/FUiCtrl_ContextMenuItem.cpp

index d8a18a4..e9f9a86 100644 (file)
@@ -124,6 +124,20 @@ _ContextMenuItem::~_ContextMenuItem(void)
                __pLowerDividerLineLabel = null;
        }
 
+       if (__pTextLabel != null)
+       {
+               DetachChild(*__pTextLabel);
+               delete __pTextLabel;
+               __pTextLabel = null;
+       }
+
+       if (__pBitmapLabel != null)
+       {
+               DetachChild(*__pBitmapLabel);
+               delete __pBitmapLabel;
+               __pBitmapLabel = null;
+       }
+
        _AccessibilityContainer* pContainer = GetAccessibilityContainer();
        if (pContainer)
        {