_IconListItem::~_IconListItem(void)
{
- __pBase->RemoveAllAnimations();
-
delete __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL];
__pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL] = null;
delete __pTextObject;
__pTextObject = null;
- for (int i = 0, n = __overlayBitmaps.size() ; i < n ; i++)
+ if (__pBase != null)
{
- _OverlayBitmap* pOverlayBitmap = __overlayBitmaps.at(i);
- delete pOverlayBitmap->pBitmap;
- pOverlayBitmap->pBitmap = null;
+ __pBase->RemoveAllAnimations();
- if (pOverlayBitmap->pVE != null)
+ for (int i = 0, n = __overlayBitmaps.size() ; i < n ; i++)
{
- if (__pBase != null)
+ _OverlayBitmap* pOverlayBitmap = __overlayBitmaps.at(i);
+ delete pOverlayBitmap->pBitmap;
+ pOverlayBitmap->pBitmap = null;
+
+ if (pOverlayBitmap->pVE != null)
{
__pBase->DetachChild(*(pOverlayBitmap->pVE));
+ pOverlayBitmap->pVE->Destroy();
+ pOverlayBitmap->pVE = null;
}
-
- pOverlayBitmap->pVE->Destroy();
- pOverlayBitmap->pVE = null;
+ delete pOverlayBitmap;
}
- delete pOverlayBitmap;
- }
-
- if (__pTextVE != null)
- {
- if (__pBase != null)
+ if (__pTextVE != null)
{
__pBase->DetachChild(*__pTextVE);
+ __pTextVE->Destroy();
+ __pTextVE = null;
}
- __pTextVE->Destroy();
- __pTextVE = null;
- }
-
- if (__pCheckVE != null)
- {
- if (__pBase != null)
+ if (__pCheckVE != null)
{
__pBase->DetachChild(*__pCheckVE);
+ __pCheckVE->Destroy();
+ __pCheckVE = null;
}
- __pCheckVE->Destroy();
- __pCheckVE = null;
- }
-
- if (__pCheckBgVE != null)
- {
- if (__pBase != null)
+ if (__pCheckBgVE != null)
{
__pBase->DetachChild(*__pCheckBgVE);
+ __pCheckBgVE->Destroy();
+ __pCheckBgVE = null;
}
- __pCheckBgVE->Destroy();
- __pCheckBgVE = null;
- }
-
- if (__pTouchAniVE!= null)
- {
- if (__pBase != null)
+ if (__pTouchAniVE!= null)
{
__pBase->DetachChild(*__pTouchAniVE);
+ __pTouchAniVE->Destroy();
+ __pTouchAniVE = null;
}
- __pTouchAniVE->Destroy();
- __pTouchAniVE = null;
- }
-
- if (__pBase != null)
- {
VisualElement* pParent = __pBase->GetParent();
if (pParent != null)
{