-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/8/11 2:47 AM, Garrett Smith wrote: > On 1/7/11, Bryan Forbes <[email protected]> wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 1/6/11 5:04 PM, Garrett Smith wrote: >>> AFAIK MSIE closure based memory leaks was addressed in IE6 sp2. >> >> Except that IE8 can still leak with ActiveXObjects: >> >> http://www.reigndropsfall.net/demos/ie_leak/leak_activexobject.html >> > You are using a meta refresh as a test to see if more memory is > consumed on each refresh? A test for a memory leak must navigate > between two or more pages.
If that is true, how do you explain memory consumption increasing as the page refreshes and it only being freed when the browser (not the tab) is closed (closing the tab doesn't free the memory)? To me, that constitutes a memory leak. > http://msdn.microsoft.com/en-us/library/dd361842%28v=vs.85%29.aspx > > "In Internet Explorer 7, these circular references are broken when > users navigate away from the page that contains the leaks." A meta > refresh is not the same thing as navigating away. This site also says: "Internet Explorer 8 includes improvements to memory management that mitigate memory leaks previously created by circular references between Microsoft JScript objects and Document Object Model (DOM) objects." and: "In Internet Explorer 8, the JScript garbage collector treats DOM objects referenced by JScript objects as JScript objects. Rather than wait until page navigation as in Internet Explorer 7 or process termination as in Internet Explorer 6, the garbage collector manages the lifetime of these DOM objects and breaks circular references whenever possible throughout the lifetime of the site." So, it would seem that the IE8 GC should be cleaning up DOM objects all the time; this is proven by my DOM leak tests that only leak in an unpatched IE6. However, the MSDN article says nothing about ActiveXObjects, which is what the link I gave you is testing. It also shouldn't matter whether the page is navigated away from or refreshed: there should be no leak. Remember, I'm referring only to IE8. > Though if I'm not mistaken, that patch landed in IE6 sp2: > http://novemberborn.net/2007/06/javascriptmemory-leaks-gone-115 That patch may have landed, but has everyone upgraded to SP2? The MSDN article you linked earlier clearly states: "Although Web developers should be aware of memory leaks created by use of programming patterns such as JScript closures in Internet Explorer 7 and earlier, those patterns no longer result in leaks in Internet Explorer 8." To me, that says that we should still be programming for the leaks that are present in IE6 and 7 since Microsoft has not announced and EOL for IE6, let alone IE7. - -- Bryan Forbes http://www.reigndropsfall.net GPG Fingerprint 3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0o/qYACgkQOIgX4HDKDz0wkQCdFF/GzmQJXtJ8m3pWtHXYjZHZ qSAAnRanjhixAQtsQhMIW5Eso5HywMY4 =joft -----END PGP SIGNATURE----- -- 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]
