<?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: [AS3] Truncating ByteArray Does Not Dispose Contents, Free Up Memory</title>
	<atom:link href="http://www.ghostwire.com/blog/archives/as3-truncating-bytearray-does-not-dispose-contents-free-up-memory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghostwire.com/blog/archives/as3-truncating-bytearray-does-not-dispose-contents-free-up-memory/</link>
	<description>Flash UI Components</description>
	<lastBuildDate>Thu, 02 Sep 2010 03:25:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Henke37</title>
		<link>http://www.ghostwire.com/blog/archives/as3-truncating-bytearray-does-not-dispose-contents-free-up-memory/comment-page-1/#comment-434</link>
		<dc:creator>Henke37</dc:creator>
		<pubDate>Tue, 08 Dec 2009 19:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghostwire.com/blog/?p=1097#comment-434</guid>
		<description>I filled a bug report https://bugs.adobe.com/jira/browse/FP-3417</description>
		<content:encoded><![CDATA[<p>I filled a bug report <a href="https://bugs.adobe.com/jira/browse/FP-3417" rel="nofollow">https://bugs.adobe.com/jira/browse/FP-3417</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: campbell</title>
		<link>http://www.ghostwire.com/blog/archives/as3-truncating-bytearray-does-not-dispose-contents-free-up-memory/comment-page-1/#comment-407</link>
		<dc:creator>campbell</dc:creator>
		<pubDate>Wed, 07 Oct 2009 11:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghostwire.com/blog/?p=1097#comment-407</guid>
		<description>Looking at Tamarin might give you an insight: check ByteArrayGlue.cpp

Specifically the method shown below.

void ByteArray::SetLength(uint32_t newLength)
	{
 		if(m_subscriberRoot &amp;&amp; m_length  m_capacity)
		{
			if (!Grow(newLength))
			{
				ThrowMemoryError();
				return;
			}
		}
		m_length = newLength;
		NotifySubscribers();
	}

It never actually shrinks the memory allocated, just updates m_length internal variable, which would is bytearray.length in as3.

So yeah a bit of a WTF issue there :)</description>
		<content:encoded><![CDATA[<p>Looking at Tamarin might give you an insight: check ByteArrayGlue.cpp</p>
<p>Specifically the method shown below.</p>
<p>void ByteArray::SetLength(uint32_t newLength)<br />
	{<br />
 		if(m_subscriberRoot &amp;&amp; m_length  m_capacity)<br />
		{<br />
			if (!Grow(newLength))<br />
			{<br />
				ThrowMemoryError();<br />
				return;<br />
			}<br />
		}<br />
		m_length = newLength;<br />
		NotifySubscribers();<br />
	}</p>
<p>It never actually shrinks the memory allocated, just updates m_length internal variable, which would is bytearray.length in as3.</p>
<p>So yeah a bit of a WTF issue there <img src='http://www.ghostwire.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
