> > I'm wondering how JS does garbage collection for objects created via new.

Kangax > The same way as objects created "without" `new` : )
Kangax > GC removes objects that are no longer referenced. When it
Kangax > does so and how it does so is implementation dependent. If
Kangax> you want a certain object to be collected (whenever GC decides
Kangax> to do so), best you can do is to make sure nothing references that\
Kangax> object.

Here's my confusion: let's say I do this

        new Ajax.Request(...);

where the object isn't assigned to a variable. Why doesn't the object become 
available for garbage collection immediately after it's
created?  Where is the reference to this new instance of Ajax.Request?

I'm obviously missing something, but what?

--
Jonathan Rosenberg
Founder & Executive Director, Tabby's Place
http://www.tabbysplace.org/






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to