* SPENDLOVE, Matt, GBM wrote (11/05/06 09:45):
I noticed that when i closed a tab in Firefox whose page utilises
prototype 1.4 i got a stream of leaks reported. Not sure if that would
be expected ?
I've just tried this on some code that I've recently I've been cleaning
for IE leaks, so I'm reasonably aware of what to look for.
I got lots of leak reports that seemed to be objects created by the
bind() method.
I found that making the unloadCache event run for Firefox made the leak
reports go away.
/* prevent memory leaks in IE */
//if (navigator.appVersion.match(/\bMSIE\b/)) <- commented this line
Event.observe(window, 'unload', Event.unloadCache, false);
Which suggests that they are arising from event observers. I use bind()
and bindAsEventListener() quite a lot.
I'm using prototype v1.5.0_rc0 (downloaded with scriptaculous).
Chris
Cheers
Matt
-----Original Message-----
*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf Of
*Maninder, Singh
*Sent:* 09 May 2006 16:36
*To:* rails-spinoffs@lists.rubyonrails.org
*Subject:* RE: [Rails-spinoffs] anyone used the new firefox leak
monitor?
Yes, I too am seeing tonnes of leaks with prototype 1.5.
Will try downgrading to the version you mention and check again.
Sigh! And I was thinking leaks only happen in IE ;)
-----Original Message-----
*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of *Gregory Hill
*Sent:* Tuesday, May 09, 2006 8:23 PM
*To:* rails-spinoffs@lists.rubyonrails.org
*Subject:* RE: [Rails-spinoffs] anyone used the new firefox leak
monitor?
Downgraded to scriptaculous 1.5.3 and prototype 1.4 and the
leaks went away with the exact same code. So, it's definitely a
Prototype problem.
Thomas, maybe you could talk to Sam about it. I've emailed him
in the past, but he never responds. It probably has to do with
the new Element.extend stuff (just a hunch since it was the most
drastic change in the latest release).
Greg
------------------------------------------------------------------------
*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf
Of *Gregory Hill
*Sent:* Tuesday, May 09, 2006 8:46 AM
*To:* rails-spinoffs@lists.rubyonrails.org
*Subject:* [Rails-spinoffs] anyone used the new firefox leak
monitor?
One of the Mozilla developer released a new extension to detect
JS memory leaks:
https://addons.mozilla.org/firefox/2490/
If it's accurate, it might be bad news for Prototype. I have
some code using prototype 1.4 with no leaks, but other code with
1.5 leaks on every single bindAsEventListener call, and a bunch
of other places. Not sure if it's just me; I may just be using
it incorrectly on the one project. But, I can't see anything at
first glance to indicate that.
Just downloaded the newer version of the plugin, so I'll do
some more digging. Anyone else used this yet?
Greg
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs