Memory Test 2 (ちゃんと GC されてる) Saqoosha forked:2 favorite:2 lines:32 license : MIT License modified : 2009-04-13 16:55:54 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 Stats toString scaleY scaleX MouseEvent.ENTER_FRAME addChild addEventListener text TextFormat Sprite int sort new page view favorite forked pv 0 forked from: Memory Test 2 (ちゃ.. berrybutton forked:0 favorite:0 lines:32 ( diff:1 ) pv 0 forked from: Memory Test 2 (ちゃ.. berrybutton forked:0 favorite:0 lines:32 ( diff:1 )