* Chris Lear wrote (11/05/06 10:44):
* 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).
... Also see http://dev.rubyonrails.org/ticket/3726 for why my fix might
be a bad idea. This also probably explains why prototype 1.4 shows no
leaks - the unload event was unconditional.
Chris
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs