<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Memory Leaks in Microsoft Internet Explorer</title>
	<atom:link href="http://foohack.com/2007/06/msie-memory-leaks/feed/" rel="self" type="application/rss+xml" />
	<link>http://foohack.com/2007/06/msie-memory-leaks/</link>
	<description>Isaac Schlueter on Web Development</description>
	<pubDate>Sat, 17 May 2008 13:47:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Isaac</title>
		<link>http://foohack.com/2007/06/msie-memory-leaks/#comment-310</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Tue, 22 Jan 2008 05:28:08 +0000</pubDate>
		<guid isPermaLink="false">http://foohack.com/2007/06/msie-memory-leaks/#comment-310</guid>
		<description>@Chris

I don't mind at all.

Like I said, hopefully this entire topic will be one for the history books sooner rather than later.  IE 7 is gobbling up browser share on PCs pretty quickly.  &lt;a href="http://en.wikipedia.org/wiki/Internet_Explorer" rel="nofollow"&gt;On Wikipedia&lt;/a&gt;, IE 7 is up to 40%, and IE 6 is down to 35%.  Last I heard at Yahoo, IE 7 was about tied with IE 6, and that was only 6 months after release.  IE 7 isn't my favorite browser to develop for, but at least it doesn't leak memory as badly.</description>
		<content:encoded><![CDATA[<p>@Chris</p>
<p>I don&#8217;t mind at all.</p>
<p>Like I said, hopefully this entire topic will be one for the history books sooner rather than later.  IE 7 is gobbling up browser share on PCs pretty quickly.  <a href="http://en.wikipedia.org/wiki/Internet_Explorer" rel="nofollow" class="external">On Wikipedia</a>, IE 7 is up to 40%, and IE 6 is down to 35%.  Last I heard at Yahoo, IE 7 was about tied with IE 6, and that was only 6 months after release.  IE 7 isn&#8217;t my favorite browser to develop for, but at least it doesn&#8217;t leak memory as badly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://foohack.com/2007/06/msie-memory-leaks/#comment-309</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 22 Jan 2008 05:17:37 +0000</pubDate>
		<guid isPermaLink="false">http://foohack.com/2007/06/msie-memory-leaks/#comment-309</guid>
		<description>http://chris-forbes.livejournal.com/2008/01/22/ might shed some light on *why* these memory leaks happen - I was going to post it right here, but it was article-length anyway ;)

Hope you don't mind, Isaac :)</description>
		<content:encoded><![CDATA[<p><a href="http://chris-forbes.livejournal.com/2008/01/22/" rel="nofollow" class="external">http://chris-forbes.livejournal.com/2008/01/22/</a> might shed some light on *why* these memory leaks happen - I was going to post it right here, but it was article-length anyway <img src='http://foohack.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Hope you don&#8217;t mind, Isaac <img src='http://foohack.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac</title>
		<link>http://foohack.com/2007/06/msie-memory-leaks/#comment-308</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Tue, 22 Jan 2008 04:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://foohack.com/2007/06/msie-memory-leaks/#comment-308</guid>
		<description>@Chris

Ha.  You're absolutely right *^_^*

Editing now, thanks for the correction.</description>
		<content:encoded><![CDATA[<p>@Chris</p>
<p>Ha.  You&#8217;re absolutely right *^_^*</p>
<p>Editing now, thanks for the correction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://foohack.com/2007/06/msie-memory-leaks/#comment-307</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 22 Jan 2008 04:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://foohack.com/2007/06/msie-memory-leaks/#comment-307</guid>
		<description>Isaac: Seeing as you're talking about *Microsoft's* browser, I assume that when you say "XPCom", you actually just mean "COM". "XPCom" is Mozilla's cross-platform invention - "COM" is Microsoft's technology.</description>
		<content:encoded><![CDATA[<p>Isaac: Seeing as you&#8217;re talking about *Microsoft&#8217;s* browser, I assume that when you say &#8220;XPCom&#8221;, you actually just mean &#8220;COM&#8221;. &#8220;XPCom&#8221; is Mozilla&#8217;s cross-platform invention - &#8220;COM&#8221; is Microsoft&#8217;s technology.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac</title>
		<link>http://foohack.com/2007/06/msie-memory-leaks/#comment-7</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Tue, 12 Jun 2007 00:21:20 +0000</pubDate>
		<guid isPermaLink="false">http://foohack.com/2007/06/msie-memory-leaks/#comment-7</guid>
		<description>1. IE7 does not leak memory in the same way that IE6 does.

2. Great question.  It's funny you ask, since I'm actually researching and working on a blog post that will discuss this, but here's a quicky $0.50 tour of the landscape.

The problem is not that the links are circular, per se, but that the references make a circle between Dom (really, &lt;del&gt;XPCom&lt;/del&gt; Com) object-space and Javascript object-space.  IE6 handles circular links fine as long as they never cross that boundary.

I'm not sure of the specifics of every implementation of course, but conceptually, ECMAScript suggests a "mark and sweep" method of garbage collection.  Each object has a "mark" bit.  Objects fall into two categories: globals (or "roots") and scope variables.  Every "so often" (on a timer, or when some condition is met, or at particular points in the script parse/execute cycle, or whatever), the garbage collector runs through all the objects in memory, and clears the mark bit.  Then, it starts from the root global objects and the scoped objects on the call stack, and traverses the tree, marking every variable that it can reach.  (Note, this also includes the call-stacks of all function objects that are reachable---that's part of the reason why functions are so big, memory-wise.)

Once it's traversed the tree of objects and marked the things that are reachable, it "sweeps" through again, and releases any objects that are not marked back into the heap.

So, if object A refers to object B, and object B refers to object A, but neither of them are reachable from the outside, then they'll both be reclaimed when the garbage collector sweeps through.

VBScript and &lt;del&gt;XPCom&lt;/del&gt; Com (used to) use much simpler garbage collection mechanisms involving reference counting.  So, when an &lt;del&gt;XPCom&lt;/del&gt; Com object (like a Dom node) refers to a Javascript object that refers back into &lt;del&gt;XPCom&lt;/del&gt; Com space, you have a case where objects A and B both have a single reference to them, and they'll never be deleted.  I'm not sure how Microsoft fixed this with IE7, but I'm very happy that they did.  It's about time.  I can't wait for this blog post to be outdated :)</description>
		<content:encoded><![CDATA[<p>1. IE7 does not leak memory in the same way that IE6 does.</p>
<p>2. Great question.  It&#8217;s funny you ask, since I&#8217;m actually researching and working on a blog post that will discuss this, but here&#8217;s a quicky $0.50 tour of the landscape.</p>
<p>The problem is not that the links are circular, per se, but that the references make a circle between Dom (really, <del>XPCom</del> Com) object-space and Javascript object-space.  IE6 handles circular links fine as long as they never cross that boundary.</p>
<p>I&#8217;m not sure of the specifics of every implementation of course, but conceptually, ECMAScript suggests a &#8220;mark and sweep&#8221; method of garbage collection.  Each object has a &#8220;mark&#8221; bit.  Objects fall into two categories: globals (or &#8220;roots&#8221;) and scope variables.  Every &#8220;so often&#8221; (on a timer, or when some condition is met, or at particular points in the script parse/execute cycle, or whatever), the garbage collector runs through all the objects in memory, and clears the mark bit.  Then, it starts from the root global objects and the scoped objects on the call stack, and traverses the tree, marking every variable that it can reach.  (Note, this also includes the call-stacks of all function objects that are reachable&#8212;that&#8217;s part of the reason why functions are so big, memory-wise.)</p>
<p>Once it&#8217;s traversed the tree of objects and marked the things that are reachable, it &#8220;sweeps&#8221; through again, and releases any objects that are not marked back into the heap.</p>
<p>So, if object A refers to object B, and object B refers to object A, but neither of them are reachable from the outside, then they&#8217;ll both be reclaimed when the garbage collector sweeps through.</p>
<p>VBScript and <del>XPCom</del> Com (used to) use much simpler garbage collection mechanisms involving reference counting.  So, when an <del>XPCom</del> Com object (like a Dom node) refers to a Javascript object that refers back into <del>XPCom</del> Com space, you have a case where objects A and B both have a single reference to them, and they&#8217;ll never be deleted.  I&#8217;m not sure how Microsoft fixed this with IE7, but I&#8217;m very happy that they did.  It&#8217;s about time.  I can&#8217;t wait for this blog post to be outdated <img src='http://foohack.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SeventhCycle</title>
		<link>http://foohack.com/2007/06/msie-memory-leaks/#comment-6</link>
		<dc:creator>SeventhCycle</dc:creator>
		<pubDate>Mon, 11 Jun 2007 23:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://foohack.com/2007/06/msie-memory-leaks/#comment-6</guid>
		<description>Two things I'm curious about:

1) Are you aware of any differences on how IE7 handles garbage collection?

2) How do other browsers handle circular links?</description>
		<content:encoded><![CDATA[<p>Two things I&#8217;m curious about:</p>
<p>1) Are you aware of any differences on how IE7 handles garbage collection?</p>
<p>2) How do other browsers handle circular links?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
