<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Garbage Collector troubles using the Loader class.</title>
	<atom:link href="http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/</link>
	<description></description>
	<lastBuildDate>Tue, 10 Aug 2010 15:14:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: troy lawrence</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-5571</link>
		<dc:creator>troy lawrence</dc:creator>
		<pubDate>Thu, 05 Jun 2008 21:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-5571</guid>
		<description>I&#039;m having the same problem with the memory going sky high in the browser.  Did anyone come up with a solid solution for this?  It&#039;s my understanding that each swf is being loaded and never cleared from the memory.  I&#039;ve been working on this all day with no solution yet  :(

problem site:
http://www.troylawrence.com/mb2008/tile_as3.html</description>
		<content:encoded><![CDATA[<p>I&#8217;m having the same problem with the memory going sky high in the browser.  Did anyone come up with a solid solution for this?  It&#8217;s my understanding that each swf is being loaded and never cleared from the memory.  I&#8217;ve been working on this all day with no solution yet  <img src='http://blog.powerupmedia.nl/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>problem site:<br />
<a href="http://www.troylawrence.com/mb2008/tile_as3.html" rel="nofollow">http://www.troylawrence.com/mb2008/tile_as3.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M:ke</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-2642</link>
		<dc:creator>M:ke</dc:creator>
		<pubDate>Sat, 29 Dec 2007 12:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-2642</guid>
		<description>Stop! This &quot;bug&quot; is still not fixed satisfyingly. Ive played around with the Loader-Class (I have coded a kind of HTML-renderer) and made the following oberservations:

* With 9.0.2 loading and removing simple images (jpg) with garbage collector works fine.
* It doesnt matter if you remove any event listeners (Event.COMPLETE), but its always a good idea to do that.
* You dont need to unload the Loader.
* You dont need to remove the Loader (or its content) from its parent.
* It DOES MATTER which kind of SWF you load. I load a third party SWF-file into my HTML-engine and the garbage collector was not able to remove this file from the memory. I built a test SWF-file in AS3 without import protection and it works! Dont know how to check this in the future, the SecurityErrorEvent hadn&#039;t dispatched. But maybe using the LocalConnection is a solution.
* Its RECOMMENDED to start the garbage collector manually. I call the function every 3 seconds with an interval for now.

Code for the garbage collector:

-----
import flash.net.LocalConnection;
import flash.system.System;
private function collectGarbage():void {
	trace(&quot;memory before: &quot; + (System.totalMemory/1024) + &quot; kiB&quot;);
	try {
	   new LocalConnection().connect(&#039;foo&#039;);
	   new LocalConnection().connect(&#039;foo&#039;);
	} catch (e:*) {} 
	trace(&quot;memory after: &quot; + (System.totalMemory/1024) + &quot; kiB&quot;);
}
-----</description>
		<content:encoded><![CDATA[<p>Stop! This &#8220;bug&#8221; is still not fixed satisfyingly. Ive played around with the Loader-Class (I have coded a kind of HTML-renderer) and made the following oberservations:</p>
<p>* With 9.0.2 loading and removing simple images (jpg) with garbage collector works fine.<br />
* It doesnt matter if you remove any event listeners (Event.COMPLETE), but its always a good idea to do that.<br />
* You dont need to unload the Loader.<br />
* You dont need to remove the Loader (or its content) from its parent.<br />
* It DOES MATTER which kind of SWF you load. I load a third party SWF-file into my HTML-engine and the garbage collector was not able to remove this file from the memory. I built a test SWF-file in AS3 without import protection and it works! Dont know how to check this in the future, the SecurityErrorEvent hadn&#8217;t dispatched. But maybe using the LocalConnection is a solution.<br />
* Its RECOMMENDED to start the garbage collector manually. I call the function every 3 seconds with an interval for now.</p>
<p>Code for the garbage collector:</p>
<p>&#8212;&#8211;<br />
import flash.net.LocalConnection;<br />
import flash.system.System;<br />
private function collectGarbage():void {<br />
	trace(&#8220;memory before: &#8221; + (System.totalMemory/1024) + &#8221; kiB&#8221;);<br />
	try {<br />
	   new LocalConnection().connect(&#8216;foo&#8217;);<br />
	   new LocalConnection().connect(&#8216;foo&#8217;);<br />
	} catch (e:*) {}<br />
	trace(&#8220;memory after: &#8221; + (System.totalMemory/1024) + &#8221; kiB&#8221;);<br />
}<br />
&#8212;&#8211;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M:ke</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-2639</link>
		<dc:creator>M:ke</dc:creator>
		<pubDate>Sat, 29 Dec 2007 10:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-2639</guid>
		<description>This bug is fixed in Flash IDE Version 9.0.2.</description>
		<content:encoded><![CDATA[<p>This bug is fixed in Flash IDE Version 9.0.2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M:ke</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-2557</link>
		<dc:creator>M:ke</dc:creator>
		<pubDate>Mon, 24 Dec 2007 07:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-2557</guid>
		<description>Same problem still exists in projectors. Dont know which versionen fixes this issue. I wrote a complex structure which increases memory because the garbage collector doesnt work like expected. Finally Ive found the problem with the Loader-Class, but no solution.</description>
		<content:encoded><![CDATA[<p>Same problem still exists in projectors. Dont know which versionen fixes this issue. I wrote a complex structure which increases memory because the garbage collector doesnt work like expected. Finally Ive found the problem with the Loader-Class, but no solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunil</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-1377</link>
		<dc:creator>Sunil</dc:creator>
		<pubDate>Wed, 31 Oct 2007 17:13:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-1377</guid>
		<description>I&#039;ve spent all day trying to work out why my Class definitions weren&#039;t being garbage collected. I read this, tried running my app in Firefox instead of the IDE and it worked! Thankyou very much!!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve spent all day trying to work out why my Class definitions weren&#8217;t being garbage collected. I read this, tried running my app in Firefox instead of the IDE and it worked! Thankyou very much!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arno van Oordt</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-15</link>
		<dc:creator>Arno van Oordt</dc:creator>
		<pubDate>Wed, 20 Jun 2007 14:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-15</guid>
		<description>Fixed the link...</description>
		<content:encoded><![CDATA[<p>Fixed the link&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fardeen</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-14</link>
		<dc:creator>Fardeen</dc:creator>
		<pubDate>Wed, 20 Jun 2007 14:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-14</guid>
		<description>The link isn&#039;t working .

By the way, if find that : 

http://www.adobe.com/support/documentation/en/flashplayer/9/releasenotes.html

Developers should not rely on garbage collection if immediate clean up of active objects, such as display objects, streams and media, is expected. Use the appropriate ActionScript 3.0 APIs (close, removeEvent Listener, etc.) to get immediate behavior when cleaning up active objects.

Are they joking ?</description>
		<content:encoded><![CDATA[<p>The link isn&#8217;t working .</p>
<p>By the way, if find that : </p>
<p><a href="http://www.adobe.com/support/documentation/en/flashplayer/9/releasenotes.html" rel="nofollow">http://www.adobe.com/support/documentation/en/flashplayer/9/releasenotes.html</a></p>
<p>Developers should not rely on garbage collection if immediate clean up of active objects, such as display objects, streams and media, is expected. Use the appropriate ActionScript 3.0 APIs (close, removeEvent Listener, etc.) to get immediate behavior when cleaning up active objects.</p>
<p>Are they joking ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PeZ</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-13</link>
		<dc:creator>PeZ</dc:creator>
		<pubDate>Wed, 20 Jun 2007 11:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-13</guid>
		<description>I was just going to post the solution as I ran your example in flex builder and it worked fine ;)

btw , can you fix the url in the second update?

Thx</description>
		<content:encoded><![CDATA[<p>I was just going to post the solution as I ran your example in flex builder and it worked fine <img src='http://blog.powerupmedia.nl/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>btw , can you fix the url in the second update?</p>
<p>Thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-12</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Wed, 20 Jun 2007 01:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-12</guid>
		<description>In your update 1, how you diposed the bitmap data... Thanks! By the way, I have the same problem with you, but mine seems to be more terrible! I ran my test  in IE browser, the memory still increase...</description>
		<content:encoded><![CDATA[<p>In your update 1, how you diposed the bitmap data&#8230; Thanks! By the way, I have the same problem with you, but mine seems to be more terrible! I ran my test  in IE browser, the memory still increase&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fardeen</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-11</link>
		<dc:creator>Fardeen</dc:creator>
		<pubDate>Tue, 19 Jun 2007 22:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-11</guid>
		<description>Thanks a lot !</description>
		<content:encoded><![CDATA[<p>Thanks a lot !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arno van Oordt</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-10</link>
		<dc:creator>Arno van Oordt</dc:creator>
		<pubDate>Tue, 19 Jun 2007 21:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-10</guid>
		<description>&lt;p&gt;Check the 2nd update in the post for a solution/workaround (whatever you want to call it :&#124; )!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Check the 2nd update in the post for a solution/workaround (whatever you want to call it <img src='http://blog.powerupmedia.nl/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' />  )!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fardeen</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-9</link>
		<dc:creator>Fardeen</dc:creator>
		<pubDate>Tue, 19 Jun 2007 18:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-9</guid>
		<description>I have the same problem with Papervision.

My flash is using more and more memory...

I removed my object from the displayList, i removed the listeners (with weakreference), i removed every link i could find. But the problem is still here :(</description>
		<content:encoded><![CDATA[<p>I have the same problem with Papervision.</p>
<p>My flash is using more and more memory&#8230;</p>
<p>I removed my object from the displayList, i removed the listeners (with weakreference), i removed every link i could find. But the problem is still here <img src='http://blog.powerupmedia.nl/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maikel Sibbald</title>
		<link>http://blog.powerupmedia.nl/2007/06/18/garbage-collector-troubles-using-the-loader-class/comment-page-1/#comment-8</link>
		<dc:creator>Maikel Sibbald</dc:creator>
		<pubDate>Tue, 19 Jun 2007 07:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.justgreat.nl/?p=44#comment-8</guid>
		<description>Yep that&#039;s just great!!! I&#039;ve seen it.... It&#039;s sucks man...!!</description>
		<content:encoded><![CDATA[<p>Yep that&#8217;s just great!!! I&#8217;ve seen it&#8230;. It&#8217;s sucks man&#8230;!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
