I assume you have to be right, since nothing else makes sense, but ...

My thinking was based on the many, many examples I've seen in the documentation 
of js packages.  For example,


And many more.

Nowhere does the documentation mention that these examples are unsafe as 
written, since the garbage collector could kick in at any
time & pick these up before they complete their "missions."

In fact, on this page


There is a complete example towards the bottom of the page 
(setupCategoryEditor) that shows this.

What am I missing?

Jonathan Rosenberg
Founder & Executive Director, Tabby's Place

> -----Original Message-----
> From: prototype-scriptaculous@googlegroups.com 
> [mailto:prototype-scriptacul...@googlegroups.com] On
> Behalf Of kangax
> Sent: Saturday, January 24, 2009 14:36
> To: Prototype & script.aculo.us
> Subject: [Proto-Scripty] Re: Garbage Collection in Javascript
> On Jan 24, 2:04 pm, "Jonathan Rosenberg" <j...@tabbysplace.org> wrote:
> [...]
> > 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?
> What makes you think this object does not become immediately available
> for garbage collection?
> --
> kangax

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