[]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]
语句后头为打印结果 小白在这求各路大神解释一下
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]
语句后头为打印结果 小白在这求各路大神解释一下
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
cuixueying
赞同来自: