issue #2271: fixed memory leak of CCControlColorPicker

This commit is contained in:
minggo 2013-06-09 14:36:16 +08:00
parent 6eaa1f97ec
commit c4ab295846
1 changed files with 3 additions and 18 deletions

View File

@ -46,24 +46,9 @@ CCControlColourPicker::CCControlColourPicker()
CCControlColourPicker::~CCControlColourPicker()
{
if (m_background)
{
m_background->removeFromParentAndCleanup(true);
}
if (m_huePicker)
{
m_huePicker->removeFromParentAndCleanup(true);
}
if (m_colourPicker)
{
m_colourPicker->removeFromParentAndCleanup(true);
}
m_background = NULL;
m_huePicker = NULL;
m_colourPicker = NULL;
CC_SAFE_RELEASE(m_background);
CC_SAFE_RELEASE(m_huePicker);
CC_SAFE_RELEASE(m_colourPicker);
}
bool CCControlColourPicker::init()