[haXe] Timer and RAM
Nicolas Cannasse
ncannasse at motion-twin.com
Sun Aug 6 22:15:11 CEST 2006
> LoadVars ) php file and load back results. Everything works ok but
> every time Timer executes, the amount of memory used by IE increases
> constantly. Is it normal bahaviour ? Here is a part of my app, which
> consumes the memory too.
>
> import haxe.Timer ;
> import flash.external.ExternalInterface ;
>
> class Interfejs
> {
> static var interval : haxe.Timer ;
> static function main()
> {
> interval= new haxe.Timer(50) ;
> interval.run = function()
> {
> var teraz : Date ;
> teraz = Date.now() ;
> ExternalInterface.call("Now_", teraz.toString() ) ; }
> }
> }
>
> "ExternalInterface.call("Now", teraz.toString() ) " calls JavaScript
> function 'Now_" which writes current time on the page. For testing
> purpose timeout here is set to 50 ms.
It's possible that there is a memory leak in ExternalInterface, but this
is not an haXe specific problema and you should get exactly the same
results while using Flash. If you're using the Debug Player, that might
also be the cause (?). Maybe ugrading to Flash Player 9 would help there.
> Next question:
> A part of code :
>
> var sender:LoadVars = new LoadVars();
> sender.element = "" ;
>
> Compiling with option 'flash-strict' complaints that 'sender has
> not field element'. Without this option compiles properly. Any
> sugestions ?
Right now use :
Reflect.setField(sender,"element","");
This will be fixed in haxe 1.05
Nicolas
More information about the Haxe
mailing list