schedule destroy variable

I have code

Rock::Rock(HelloBom *helo) :hellobom(helo)
{
	for (int i = 1; i <= number; i++)
	{
		addChild();
	}
	CCLOG("data size :%d", da.size());
	
	hellobom->schedule(SEL_SCHEDULE(&Rock::update), 1.0f / 60.0f);
}

hellobom is layer.
Rock is normal class.
and :

void Rock::update(float dt)
{
	CCLOG("data size update:%d", da.size());
	int chec = check();
	if (chec != 1000)
	{
		Sprite *sprite = da[chec];
		CCLOG("check successfully");	
		hellobom->removeChild(sprite);
		remove(sprite);
		addChild();
	}
	bunchOutSide();
}

In output window output :

data size :3
data size update:0
data size update:0
data size update:0

schedule make da have size equals 0.Where is mistake?

Please help me,i have lose many hour :frowning:

Seriously? You posted then an hour later posted again asking for a reply?
Patience, padwan.

What is ‘da’? Where to you instantiate it?

I have add 3 child
this is variable da:
std::vector<Sprite*> da;

As you see log:
data size :3
Variable da have 3 item,but when in update it have size is 0

seem function update no update variable and empty variale ?:;qst

no enough code, no conclusion.
how about use CCArray to replace vector? of course, after CCArray::create, please remember retain it if it didn’t be added to layer.