<?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: Memory Leak in AS3 Loader Class</title>
	<atom:link href="http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/</link>
	<description>There is no universally agreed-upon biological definition of dreaming</description>
	<pubDate>Wed, 07 Jan 2009 20:51:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Shadow_SB</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-444</link>
		<dc:creator>Shadow_SB</dc:creator>
		<pubDate>Thu, 14 Aug 2008 07:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-444</guid>
		<description>@Smith

Did you invoke dispose after Event.COMPLETE or unload() ?</description>
		<content:encoded><![CDATA[<p>@Smith</p>
<p>Did you invoke dispose after Event.COMPLETE or unload() ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher&#8217;s Blog&#187; Blog Archive &#187; 两篇关于AS3内存泄漏的文章</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-437</link>
		<dc:creator>Christopher&#8217;s Blog&#187; Blog Archive &#187; 两篇关于AS3内存泄漏的文章</dc:creator>
		<pubDate>Sat, 02 Aug 2008 08:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-437</guid>
		<description>[...] http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/" rel="nofollow">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: smith</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-436</link>
		<dc:creator>smith</dc:creator>
		<pubDate>Thu, 31 Jul 2008 00:07:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-436</guid>
		<description>Regarding the code:
var li:LoaderInfo = loader.contentLoaderInfo;
if(li.childAllowsParent &#38;&#38; li.content is Bitmap){
(li.content as Bitmap).bitmapData.dispose(); // remove bitmap from memory
}

when running Simulate Download in Flash IDE, got eeror:
Error: Error #2099: The loading object is not sufficiently loaded to provide this information.
	at flash.display::LoaderInfo/get childAllowsParent()
	at com.cfour.app.afl.mural::PopupWindow/disposeImage()
	at com.cfour.app.afl.mural::PopupWindow/closeHandler()

trace(li) got null.

Why?</description>
		<content:encoded><![CDATA[<p>Regarding the code:<br />
var li:LoaderInfo = loader.contentLoaderInfo;<br />
if(li.childAllowsParent &amp;&amp; li.content is Bitmap){<br />
(li.content as Bitmap).bitmapData.dispose(); // remove bitmap from memory<br />
}</p>
<p>when running Simulate Download in Flash IDE, got eeror:<br />
Error: Error #2099: The loading object is not sufficiently loaded to provide this information.<br />
	at flash.display::LoaderInfo/get childAllowsParent()<br />
	at com.cfour.app.afl.mural::PopupWindow/disposeImage()<br />
	at com.cfour.app.afl.mural::PopupWindow/closeHandler()</p>
<p>trace(li) got null.</p>
<p>Why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kglad</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-393</link>
		<dc:creator>kglad</dc:creator>
		<pubDate>Sat, 21 Jun 2008 16:21:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-393</guid>
		<description>sam, are you still checking this thread?</description>
		<content:encoded><![CDATA[<p>sam, are you still checking this thread?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Agesilas</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-333</link>
		<dc:creator>Samuel Agesilas</dc:creator>
		<pubDate>Fri, 16 May 2008 23:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-333</guid>
		<description>Awesome!! Good thing the Flash Player team confirmed and fixed the bug. Memory Leaks are so difficult to fix but thanks to folks like yourself that bring these issue's to light, really help the FP Team bang them out. Cheers!</description>
		<content:encoded><![CDATA[<p>Awesome!! Good thing the Flash Player team confirmed and fixed the bug. Memory Leaks are so difficult to fix but thanks to folks like yourself that bring these issue&#8217;s to light, really help the FP Team bang them out. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idoru</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-318</link>
		<dc:creator>Idoru</dc:creator>
		<pubDate>Wed, 14 May 2008 11:58:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-318</guid>
		<description>Wow sam, thanks for the great 'post' :) 
Right you are on all the stuff you said, altough speaking with Richard Galvan and Tinic, they acknowledged that this was indeed a Leak in the VM at the time of writing the article, it has been fixed in the latest versions.
But great post man, and thx!</description>
		<content:encoded><![CDATA[<p>Wow sam, thanks for the great &#8216;post&#8217; <img src='http://www.dreaminginflash.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Right you are on all the stuff you said, altough speaking with Richard Galvan and Tinic, they acknowledged that this was indeed a Leak in the VM at the time of writing the article, it has been fixed in the latest versions.<br />
But great post man, and thx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Agesilas</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-317</link>
		<dc:creator>Samuel Agesilas</dc:creator>
		<pubDate>Wed, 14 May 2008 11:14:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-317</guid>
		<description>Oh, I forgot to mention, that using statements like dispose() or delete does NOT work like C's dealloc statement. Meaning that all those statements do is mark a particular object for the GC to delete them(if it can) when the GC is ready to delete them. They do not necessarily delete the object immediately.

:)
Cheers,
Sam</description>
		<content:encoded><![CDATA[<p>Oh, I forgot to mention, that using statements like dispose() or delete does NOT work like C&#8217;s dealloc statement. Meaning that all those statements do is mark a particular object for the GC to delete them(if it can) when the GC is ready to delete them. They do not necessarily delete the object immediately.</p>
<p> <img src='http://www.dreaminginflash.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Cheers,<br />
Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Agesilas</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-316</link>
		<dc:creator>Samuel Agesilas</dc:creator>
		<pubDate>Wed, 14 May 2008 11:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-316</guid>
		<description>Hi Guys,

I was googling some info for an AS3 concern and I came across this post. I understand everyone's concern here but I can assure you guys that this is NOT a memory leak. Generally speaking memory leaks are caused when a program allocates memory but fails to de-allocated it correctly( The famed dealloc method in C/C++). AS3 developers for the most part can't cause memory leaks directly because of the GC, that in essence is what the GC is for, to prevent these kinds of things(there are exceptions though but they are rare). If there is a memory leak in the VM (like the one cause by the XML object several years back) is mostly likely due to faulty code in the VM. Now having said this I can assure that in your case this is not a memory leak. You see the new VM uses a much more advanced and performant GC that uses the much safer and accurate mark and sweep method. Mark and sweep is the same GC strategy that the Java VM uses as well however like the Java VM the Flash VM is also slow when using Mark and sweep, which implies that code must be written better or it will hiccup when the GC kicks in. I downloaded your code and analysed it and found it to be well written, except for the gskinner code which in this case you don't really need. Why? well because the GC just hasn't received an opportunity to removing that object yet. This is fairly common in systems that use VM's and GC's. I obviously  don't work for Adobe, so I don't have access to the C code of the Flash Player, but I've worked on VM's before and a lot of them employ a memory threshold strategy, that is the GC will only start actively or aggressively working if a certain memory threshold has been met. Example, total system memory is 1024K, your running app gets an allocation of 256K but the GC doesn't kick in until memory consumption tops 90k. Like I mentioned earlier I'm not sure if this is the case with the Flash VM but I wouldn't be surprised if it was employed to keep things moving quickly and if this is indeed the case your code probably didn't hit that threshold. Whatever the case be, rest assured that nothing is wrong with your code and that the behaviour you are witnessing is normal. The AS3 GC is much, MUCH better than it's predecessors and I know for a fact that the Flash Player Engineering Team where very much aware of the shortcomings of the previous implementation. I'll probably post a much more in-depth post on memory access in the Flash VM but for now I hope this helps. Email me if you need anything!

Cheers mate!
Sam</description>
		<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>I was googling some info for an AS3 concern and I came across this post. I understand everyone&#8217;s concern here but I can assure you guys that this is NOT a memory leak. Generally speaking memory leaks are caused when a program allocates memory but fails to de-allocated it correctly( The famed dealloc method in C/C++). AS3 developers for the most part can&#8217;t cause memory leaks directly because of the GC, that in essence is what the GC is for, to prevent these kinds of things(there are exceptions though but they are rare). If there is a memory leak in the VM (like the one cause by the XML object several years back) is mostly likely due to faulty code in the VM. Now having said this I can assure that in your case this is not a memory leak. You see the new VM uses a much more advanced and performant GC that uses the much safer and accurate mark and sweep method. Mark and sweep is the same GC strategy that the Java VM uses as well however like the Java VM the Flash VM is also slow when using Mark and sweep, which implies that code must be written better or it will hiccup when the GC kicks in. I downloaded your code and analysed it and found it to be well written, except for the gskinner code which in this case you don&#8217;t really need. Why? well because the GC just hasn&#8217;t received an opportunity to removing that object yet. This is fairly common in systems that use VM&#8217;s and GC&#8217;s. I obviously  don&#8217;t work for Adobe, so I don&#8217;t have access to the C code of the Flash Player, but I&#8217;ve worked on VM&#8217;s before and a lot of them employ a memory threshold strategy, that is the GC will only start actively or aggressively working if a certain memory threshold has been met. Example, total system memory is 1024K, your running app gets an allocation of 256K but the GC doesn&#8217;t kick in until memory consumption tops 90k. Like I mentioned earlier I&#8217;m not sure if this is the case with the Flash VM but I wouldn&#8217;t be surprised if it was employed to keep things moving quickly and if this is indeed the case your code probably didn&#8217;t hit that threshold. Whatever the case be, rest assured that nothing is wrong with your code and that the behaviour you are witnessing is normal. The AS3 GC is much, MUCH better than it&#8217;s predecessors and I know for a fact that the Flash Player Engineering Team where very much aware of the shortcomings of the previous implementation. I&#8217;ll probably post a much more in-depth post on memory access in the Flash VM but for now I hope this helps. Email me if you need anything!</p>
<p>Cheers mate!<br />
Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 0e28503c2640</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-312</link>
		<dc:creator>0e28503c2640</dc:creator>
		<pubDate>Sat, 10 May 2008 19:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-312</guid>
		<description>&lt;strong&gt;0e28503c2640&lt;/strong&gt;

0e28503c26406d129e13</description>
		<content:encoded><![CDATA[<p><strong>0e28503c2640</strong></p>
<p>0e28503c26406d129e13</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/comment-page-1/#comment-176</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sat, 09 Feb 2008 16:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2007/10/22/memory-leak-in-as3-loader-class/#comment-176</guid>
		<description>Just on the foo question...
In an old and famous WWII movie (can't remember the title) some guys always use the expression FUBAR and you find out at the end it stands for F@cked Up Beyond All Recognition.
That's the origin of naming sample variables foo and bar.</description>
		<content:encoded><![CDATA[<p>Just on the foo question&#8230;<br />
In an old and famous WWII movie (can&#8217;t remember the title) some guys always use the expression FUBAR and you find out at the end it stands for F@cked Up Beyond All Recognition.<br />
That&#8217;s the origin of naming sample variables foo and bar.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.345 seconds -->
