Re: [Flashcoders] garbage collection and asychronous execution

2007-08-07 Thread Andy Herrman
Which is probably a good argument for always using the other form of setInterval: setInterval(this, test, 1000); I assume in this case the object wouldn't be garbage collected because setInterval's internals now has a reference to it. -Andy On 8/6/07, Mark Winterhalder [EMAIL PROTECTED]

[Flashcoders] garbage collection and asychronous execution

2007-08-06 Thread Hans Wichman
Hi, hmm okay this might seem like a basic question, but this has been bothering me for a while:) Imagine i have a class that prints boo 10 seconds after it has been created, but returns immediately, so eg: public function doTest() { trace(here 1); new BooTest(); trace(here 2); }

Re: [Flashcoders] garbage collection and asychronous execution

2007-08-06 Thread Mark Hawley
That isn't a reference to a function -- it's a reference to a object method. The object has to hang around. On 8/6/07, Hans Wichman [EMAIL PROTECTED] wrote: Hi, hmm okay this might seem like a basic question, but this has been bothering me for a while:) Imagine i have a class that prints

Re: [Flashcoders] garbage collection and asychronous execution

2007-08-06 Thread Mark Winterhalder
On 8/6/07, Mark Hawley [EMAIL PROTECTED] wrote: That isn't a reference to a function -- it's a reference to a object method. The object has to hang around. No, it's a reference to a function. The VM doesn't know anything about methods. The interval keeps a reference to the function, the object