当我们被flash player的垃圾回收困扰时,以为flash.system.System.gc()是一个可行的办法。其实不然。 If you look at the docs for flash.system.System.gc() you will get your answer *public static function gc():void* Forces the garbage collection process. Important: For Flash Player debugger version and the AIR Debug Launcher (ADL) only. Player Version: Flash Player 9 Update 3. 看来,强制垃圾回收,也只有这种办法可以用。 function doClearance( ) : void { trace("clear"); try{ new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); }catch(error : Error){ } [...]
System.gc()也不是可以到处用的
最新推荐文章于 2023-03-09 07:45:00 发布