On Jan 24, 11:40 am, "Jonathan Rosenberg" <j...@tabbysplace.org>
> This isn't specific to Prototype, but I figured this would be a good place to 
> ask.
> I'm wondering how JS does garbage collection for objects created via new.  

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

> I doesn't seem at all obvious to me how this works, especially since there is 
> not (as far as I know) a way to destroy an object.

You're right. At least not in the standard specification (IIRC,
JScript has some proprietary ways to "force"/"trigger" GC).

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 
For more options, visit this group at 

Reply via email to