Memory Test 1 (どんどんメモリ食ってく) Saqoosha forked:2 favorite:4 lines:32 license : MIT License modified : 2009-04-13 16:54:48 package { import flash.display.MovieClip; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import flash.system.System; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFormat; import jp.progression.commands.SerialList; import net.hires.debug.Stats; [SWF(width=475, height=475, backgroundColor=0x0, frameRate=120)] public class MemoryTest extends Sprite { private var _debugText:TextField; public function MemoryTest() { var st:Stats = this.addChild(new Stats()) as Stats; st.scaleX = st.scaleY = 3; this.addEventListener(Event.ENTER_FRAME, this._update); this._debugText = this.addChild(new TextField()) as TextField; this._debugText.defaultTextFormat = new TextFormat('Verdana', 30, 0xffffff, true); this._debugText.autoSize = TextFieldAutoSize.RIGHT; this._debugText.x = 400; } private function _update(e:Event):void { var n:int = 10; while (n--) { var cmd:SerialList = new SerialList(); // var mc:MovieClip = new MovieClip(); } this._debugText.text = System.totalMemory.toString(); } } } Code Fullscreen Preview Fullscreen necoEngine ngtn kjkmr : progressionのSerialListがどこからも参照されてないのにちゃんとGCされてない clockmaker : ふむふむ Stats SerialList toString scaleY scaleX MouseEvent.ENTER_FRAME addChild addEventListener text TextFormat Sprite int sort new page view favorite forked pv 0 forked from: Memory Test 1 (どん.. syug forked:0 favorite:0 lines:32 ( diff:3 ) pv 592 forked from: Memory Test 1 (どん.. fmtonakai forked:0 favorite:0 lines:41 ( diff:12 )