转载自:http://bbs.9ria.com/thread-171321-1-1.html
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
public class TestArray extends Sprite
{
private var _all:Array = [];
private var _txt:TextField;
public function TestArray()
{
_txt = new TextField();
_txt.text = "0";
this.addChild(_txt);
this.stage.frameRate = 60;
this.addEventListener(Event.ENTER_FRAME,add);
}
private function add(event:Event):void
{
for(var i:int=0;i<50000;i++)
{
_all.push(1);
}
_txt.text = String(uint(_txt.text)+50000);
}
}
}
偶尔想主动崩溃做测试的,可以用得上