[Greasemonkey] Re: Memory Leaks

Gareth Andrew freega at freegarethandrew.org
Wed Nov 9 13:47:31 EST 2005


Hi, 

My guess is that you are adding a new event listener every-time the
window gets refreshed, but never removing any.  If you call 
removeEventListener before you refresh do you get any improvement?

Gareth.

On Wed, 2005-11-09 at 14:13 +0100, Andre wrote:
> From: Andrew Murphy <andrewm1986 at gmail.com>
> Sent: Mittwoch, 9. November 2005 13:53:49
> Subject: Memory Leaks
> > My memory usage can reach 200MB before firefox is so slow I have to open and
> > close it again!
> > 
> 
> I have found that kicking off my script by the "onload" event creates a 
> much bigger memory leak that just calling it.
> 
> Fortunately, my script can run ever before the event fires, so I removed 
> that call, and the memory leaks got smaller.
> 
> My script is used on a page that refreshed every 2 minutes. Over night I 
> have found that FF is using in excess of 500MB and stopping FF actually 
> frees 800MB of memory.
> 
> Andre
> 
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey



More information about the Greasemonkey mailing list