Created
April 4, 2015 20:48
-
-
Save gonchar/7cc746a40ba52cf629ee to your computer and use it in GitHub Desktop.
methodclosure object is not cleaned from memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.utils.getTimer; | |
public class MethodClosureTest extends Sprite { | |
public function MethodClosureTest() { | |
addEventListener(Event.ENTER_FRAME, onEnterFrame); | |
} | |
private function onEnterFrame(event:Event):void { | |
var func:Function = function ():void { | |
var time:Number = getTimer(); | |
trace("here: "+time); | |
}; | |
func(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment