<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Power-up Media Blog &#187; garbage collector</title>
	<atom:link href="http://blog.powerupmedia.nl/tag/garbage-collector/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.powerupmedia.nl</link>
	<description></description>
	<lastBuildDate>Wed, 20 Jul 2011 20:39:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Garbage Collector troubles using the Loader class.</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/</link>
		<comments>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/#comments</comments>
		<pubDate>Mon, 18 Jun 2007 19:41:26 +0000</pubDate>
		<dc:creator>Arno van Oordt</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Power-up Media]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash 9]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[loader]]></category>

		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44</guid>
		<description><![CDATA[Just great another weird Garbage Collector issue in AS3: When I load an image using the Loader class and unload it later on. It won&#8217;t be disposed by the garbage collector. There are no references to neither the Loader nor the (weak) eventlisteners. After loading the image a couple of times the memory goes sky [...]]]></description>
			<content:encoded><![CDATA[<p>Just great <img src='http://blog.powerupmedia.nl/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  another weird Garbage Collector issue in AS3:</p>
<p>When I load an image using the Loader class and unload it later on. It won&#8217;t be disposed by the garbage collector.<br />
There are no references to neither the Loader nor the (weak) eventlisteners. After loading the image a couple of times the memory goes sky high <img src='http://blog.powerupmedia.nl/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> .</p>
<p>Here is a (simple) example: <a href="http://blog.powerupmedia.nl/wp-content/uploads/2007/06/loadertest.zip" title="LoaderTest">loadertest.zip</a></p>
<p>Does anyone have an explaination on why the GC doesn&#8217;t clean the loaded content? I would be very grateful!</p>
<p><strong>UPDATE 1 (2007-06-19):</strong><br />
I made the example even less complicated by using the same Loader instance when loading new images.</p>
<p>As I work around I tried to dispose the loaded BitmapData but unfortunately it had no effect.<br />
I assume the leak is somewhere within the Loader (or even deeper in the code) and that the loaded (binary) data is not removed after it&#8217;s converted into a BitmapData.</p>
<p><strong>UPDATE 2 (2007-06-19):<br />
</strong>I found the solution on in this post:<br />
<a href="http://www.webforumz.com/macromedia-flash/42690-memory-leak-when-loading-swf-in.htm">http://www.webforumz.com/macromedia-flash/42690-memory-leak-when-loading-swf-in.htm</a><a href="http://www.webforumz.com/macromedia...ding-swf-in.htm"></a></p>
<p>It seems that the unload() method has a bug when used in the flash IDE. Once I ran the test in a browser there seem to be no more problems and the GC nicely clears the memory&#8230;</p>
<p>Lets hope Adobe fixes this problem in the next Flash 9 update.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

