Error removing?

Error removing?
0.0 0


I’m using cocos2d-x 0.13 I’m having problem removing by tag. I’ve seprate class for UI which contains object of HelloWorldScene (“m_target”). I’m adding and removing MenuItems here but it throws back error (“EXC_BAD_ACCESS” at line number 581 of CCNode.cpp) when i try to remove them. Here’s my sample code:

CCMenuItemImage* Play = CCMenuItemImage::itemFromNormalImage("play.png", "play.png", m_target, menu_selector(CUserInterface::initLevelSelection)); Play->setScale(0.5); Play->setPosition(ccp(m_WindowSize.x / 2, m_WindowSize.y / 2)); CCMenu* pMenu = CCMenu::menuWithItems(Play,NULL); pMenu->setPosition( CCPointZero ); m_target->addChild(pMenu, 3, 1001);

m_target->removeChildByTag(1001, false);