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]> wrote: > 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 gets > garbage collected, then the function gets called. It doesn't need an > object. In fact, if you'd add a trace( this ), it would be undefined. > > Mark > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

