<?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>mandarin.no &#187; memory usage</title>
	<atom:link href="http://mandarin.no/tag/memory-usage/feed/" rel="self" type="application/rss+xml" />
	<link>http://mandarin.no</link>
	<description></description>
	<lastBuildDate>Tue, 17 Aug 2010 09:35:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Garbage collecting in AIR</title>
		<link>http://mandarin.no/as3/garbage-collecting-in-air/</link>
		<comments>http://mandarin.no/as3/garbage-collecting-in-air/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 15:06:57 +0000</pubDate>
		<dc:creator>Thomas Viktil</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[garbage collector]]></category>
		<category><![CDATA[memory usage]]></category>
		<category><![CDATA[system.gc]]></category>
		<guid isPermaLink="false">http://mandarin.no/?p=110</guid>
		<description><![CDATA[At a recent project I had to make a video loop indefinitely and most importanly: seemless. I tried all kinds of different methods, including using FLV, F4V, M4V, FLVplayback component, the Video class, embedded video and a few other. The only solution that worked was (in my opinion) the most outdated one. I setup a [...]]]></description>
			<content:encoded><![CDATA[<p>At a recent project I had to make a video loop indefinitely and most importanly: seemless. I tried all kinds of different methods, including using FLV, F4V, M4V, FLVplayback component, the Video class, embedded video and a few other. The only solution that worked was (in my opinion) the most outdated one.</p>
<p>I setup a new SWF file in Flash Professional and imported the video to stage. I chose to create keyframes for each frame of the video, set the JPG compression rate to 100 and then exported the video as a SWF. This was the only method I could find that would make the video loop seamlessly. It solved one problem but introduced another.</p>
<p>As the application ran I monitored the memory usage and soon discovered that the application ate up more and more memory for each time the video looped. To solve this problem I forced the garbage collector to run each time the video completed a loop. This kept the memory usage stable and the application has now been running for about a month.</p>
<p>This is how you run the garbage collector:</p>
<blockquote>
<pre>System.gc()</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mandarin.no/as3/garbage-collecting-in-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
