标签:
function testRemoveChild():void { var startTime:int = getTimer(); var count:int = 9999; for (var i:int = 0; i < count; i++) { var sp:Sprite = new Sprite(); addChild(sp); } trace("创建对象计算用时",getTimer()-startTime,"毫秒"); startTime = getTimer(); while(this.numChildren) this.removeChildAt(this.numChildren-1);; // while(this.numChildren) // this.removeChildAt(0); trace("移除对象计算用时",getTimer()-startTime,"毫秒"); } testRemoveChild();
标签:
原文地址:http://www.cnblogs.com/jiangjieqim/p/5468199.html