<?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>cameronyule.com &#187; memory leak</title>
	<atom:link href="http://cameronyule.com/tags/memory-leak/feed" rel="self" type="application/rss+xml" />
	<link>http://cameronyule.com</link>
	<description>Glasgow based new media developer Cameron Yule.</description>
	<lastBuildDate>Fri, 22 Jan 2010 12:53:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Text Layout Framework memory leak</title>
		<link>http://cameronyule.com/2009/04/text-layout-framework-memory-leak</link>
		<comments>http://cameronyule.com/2009/04/text-layout-framework-memory-leak#comments</comments>
		<pubDate>Mon, 27 Apr 2009 06:49:51 +0000</pubDate>
		<dc:creator>Cameron</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[memory leak]]></category>
		<category><![CDATA[text layout framework]]></category>

		<guid isPermaLink="false">http://cameronyule.com/?p=573</guid>
		<description><![CDATA[Shortly before I flew to Abu Dhabi for Cityscape, I found a memory leak in the AIR application I&#8217;d been developing for the past few months. As with most memory leaks it only became apparent after several hours of usage, and given the application had to run at least 10 hours a day, was a [...]]]></description>
			<content:encoded><![CDATA[<p>Shortly before I flew to Abu Dhabi for <a href="http://www.cityscapeabudhabi.com/">Cityscape</a>, I found a memory leak in the AIR application I&#8217;d been developing for the past few months. As with most memory leaks it only became apparent after several hours of usage, and given the application had to run at least 10 hours a day, was a serious problem.</p>
<p>Thankfully, Flex Builder has a <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=profiler_3.html">profiler</a> tool built-in, and leaving my application running for hours in the profiler revealed the rapid accumulation of instances of a mystery class <code>TextAccImpl</code>, which it&#8217;s package structure revealed was part of the new <a href="http://labs.adobe.com/technologies/textlayout/">Text Layout Framework</a>.</p>
<p>This was more problematic than you may imagine, as not only is the <acronym title="Text Layout Framework">TLF</acronym> still in beta, but was an integral part of my application as it gave us the ability to switch seamlessly between English and Arabic.</p>
<p>After spending time tweaking my code to check if I was using the API incorrectly, it became apparent it was a bug in <acronym title="Text Layout Framework">TLF</acronym> itself. Googling didn&#8217;t find anything, so I resorted to the official <acronym title="Text Layout Framework">TLF</acronym> blog, where I noticed a post announcing they were <a href="http://blogs.adobe.com/tlf/2009/04/weekly_tlf_builds_now_availabl.html">releasing weekly builds</a> to their <a href="http://labs.adobe.com/downloads/textlayout.html">Adobe Labs download</a> page.</p>
<p>As I was compiling against the version of <acronym title="Text Layout Framework">TLF</acronym> that came with the Flex 4 MAX Preview, I decided to upgrade by adding the latest weekly build (411 at that time) as an external library to my project. After making the necessary changes to my code to reflect the API changes they&#8217;d made, I left my application running in the profiler overnight and to my relief the bug had been fixed.</p>
<p>If anyone is experiencing dramatic degradation of performance over time after adding the <acronym title="Text Layout Framework">TLF</acronym> to your application, I&#8217;d recommend you upgrade to the latest weekly build.</p>
]]></content:encoded>
			<wfw:commentRss>http://cameronyule.com/2009/04/text-layout-framework-memory-leak/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

