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]
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);
}
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
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
4 matches
Mail list logo