[Greasemonkey] access to injected scripts?

Bill Donnelly donnelly at snowcrest.net
Mon May 30 11:10:51 EDT 2005


So the script stays around because it begins executing when you load it,
and it is an object that is being referenced by something, even though
you remove it from the DOM. So the DOM reference is gone.
But how does it know when to free that object and its memory?
When you close the window? When you surf to another page in
that same window? When you close Firefox? I'm just wondering
in a programming and design and "memory leak" sense.

Aaron Boodman wrote:

 > As I showed in the previous code snippet, the script element
 > for each user script is removed from the DOM as soon as it is
 > finished being evaluated.



More information about the Greasemonkey mailing list