[]destroyChildren 销毁对象后为什么依旧能取得内部属性 removeChildren destroyChildren的区别

_bottomBtn = new BottomBtn();//这个对象内部有一个属性为testNum;
            this.addChild(_bottomBtn);
            trace("测试1 = " + _bottomBtn.testNum + "-" + _bottomBtn);// 测试1 = 1-[object Object]
            this.removeChildren();
            trace("测试2 = " + _bottomBtn.testNum + "-" + _bottomBtn);// 测试2 = 1-[object Object]
            this.destroyChildren();
            trace("测试3 = " + _bottomBtn.testNum + "-" + _bottomBtn); // 测试3 = 1-[object Object]

语句后头为打印结果  小白在这求各路大神解释一下
已邀请:

cuixueying

赞同来自:

这个销毁是从显示列表和显存中销毁,你把_bottomBtn置null,就OK了!

要回复问题请先

商务合作
商务合作