On Wed, Dec 15, 2010 at 11:14 AM, Asen Bozhilov <[email protected]>wrote:
> Peter Foti :
>
> > function addEvent( obj, type, fn ) {
> > if ( obj.attachEvent ) {
> > obj['e'+type+fn] = fn;
> > obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
> > obj.attachEvent( 'on'+type, obj[type+fn] );
> > }
>
> This is perfectly example of how you can setup circular reference
> pattern, which cause memory leak in older IE.
>
Those leaks were fixed 3 and a half years ago.
http://support.microsoft.com/kb/929874/
But yes, for the severe minority who are still using IE6 and never bothered
to get the update, this may leak memory for them. As I said, there are many
roll-your own approaches out there, I just picked one at random. :)
-Peter Foti
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]