关于删除一个layer后层中精灵引用计数的问题

有一个疑问,每当addchild添加精灵的时候,精灵的引用计数会加1, 当删除层的时候,精灵的技术会减一吗?
我测试的是没有减1, 那删除layer的时候 精灵什么时候减1 呢?
是析构的时候减1吗?

测试代码如下:
Sprite * sp = Sprite::create(“1.png”);
CCLOG("----%d", sp->getReferenceCount());

auto layer = Layer::create();
layer->addChild(sp);
this->addChild(layer);
CCLOG("--------%d", sp->getReferenceCount());


this->removeFromParentAndCleanup(true);
CCLOG("------------%d", sp->getReferenceCount());


while (1)
{
    CCLOG("---%d", sp->getReferenceCount());
}

还是autorealease把所有的子节点release

http://www.tairan.com/archives/4184 找到答案 链式反应