<?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 Collection with Flex and Adobe Air</title>
	<atom:link href="http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/feed/" rel="self" type="application/rss+xml" />
	<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/</link>
	<description>RIAbilitating the Internet</description>
	<lastBuildDate>Tue, 09 Mar 2010 11:08:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: lwz7512</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10125</link>
		<dc:creator>lwz7512</dc:creator>
		<pubDate>Sun, 24 Jan 2010 15:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10125</guid>
		<description>great post,I&#039;ve translate to chinese:
http://www.riameeting.com/node/587</description>
		<content:encoded><![CDATA[<p>great post,I&#8217;ve translate to chinese:<br />
<a href="http://www.riameeting.com/node/587" rel="nofollow">http://www.riameeting.com/node/587</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cesare</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10066</link>
		<dc:creator>Cesare</dc:creator>
		<pubDate>Thu, 21 Jan 2010 18:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10066</guid>
		<description>The cache I use is a way to ensure that each renderer has only, at most, 2 references: one in the display tree and one in the cache itself. I got to this solution by experimentation and I solved many of the issues I had when dealing with renderers.</description>
		<content:encoded><![CDATA[<p>The cache I use is a way to ensure that each renderer has only, at most, 2 references: one in the display tree and one in the cache itself. I got to this solution by experimentation and I solved many of the issues I had when dealing with renderers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob McKeown</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10065</link>
		<dc:creator>Rob McKeown</dc:creator>
		<pubDate>Thu, 21 Jan 2010 18:48:25 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10065</guid>
		<description>So when removing from the cache, how do you ensure that its memory gets freed? It doesn&#039;t look like it is doing  anything special with the renderers other than store them in a collection. Would cache.removeItemAt(n) free the memory allocated to the renderer and position n? I guess I don&#039;t understand why removing an item from the cache would behave any differently than removing from the display list  (assuming there are no other references to the renderer).</description>
		<content:encoded><![CDATA[<p>So when removing from the cache, how do you ensure that its memory gets freed? It doesn&#8217;t look like it is doing  anything special with the renderers other than store them in a collection. Would cache.removeItemAt(n) free the memory allocated to the renderer and position n? I guess I don&#8217;t understand why removing an item from the cache would behave any differently than removing from the display list  (assuming there are no other references to the renderer).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cesare</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10064</link>
		<dc:creator>Cesare</dc:creator>
		<pubDate>Thu, 21 Jan 2010 18:05:17 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10064</guid>
		<description>Beware, removeChild just removes a renderer from the display tree, as explained in the post. This does not ensure it is removed from memory. Before calling removeChild you can call MyRendererCache.setRenderer(...) to give it back and there you can check whether your cache is too big or not: if yes, you can remove some renderer also from the cache.</description>
		<content:encoded><![CDATA[<p>Beware, removeChild just removes a renderer from the display tree, as explained in the post. This does not ensure it is removed from memory. Before calling removeChild you can call MyRendererCache.setRenderer(&#8230;) to give it back and there you can check whether your cache is too big or not: if yes, you can remove some renderer also from the cache.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob McKeown</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10061</link>
		<dc:creator>Rob McKeown</dc:creator>
		<pubDate>Thu, 21 Jan 2010 17:01:17 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10061</guid>
		<description>Understood... the way I have implemented this in Klok is that the container manages the renderers by doing basically what your cache does so that when the data provider changes, no new renderers are created unless there weren&#039;t enough. However, if the new data provider has less items, then I remove the child renderers using removeChild. I would like to ensure some way of efficiently freeing their memory so that I don&#039;t have the problem you describe.</description>
		<content:encoded><![CDATA[<p>Understood&#8230; the way I have implemented this in Klok is that the container manages the renderers by doing basically what your cache does so that when the data provider changes, no new renderers are created unless there weren&#8217;t enough. However, if the new data provider has less items, then I remove the child renderers using removeChild. I would like to ensure some way of efficiently freeing their memory so that I don&#8217;t have the problem you describe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cesare</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10060</link>
		<dc:creator>Cesare</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10060</guid>
		<description>@Rob The cache prevents them from being collected, but is also establishes a limit: if you loaded 20-30-10 items your cache length will be 30. With no cache you might have, in the worst case, 60 renderers.
If you have an application with high variability (alternate loading of many and few data) it is better to have a policy in the setter, as explained above. 
In the &quot;normal case&quot; it depends on the implementation: e.g. if you use a Repeater component you can have a look at the generated code, if you code it your own you are responsible for that. My solution is just a way to have a controllable &quot;centralized&quot; mechanism to generate/delete renderers, so if there are issues about memory I know where to look in the code.</description>
		<content:encoded><![CDATA[<p>@Rob The cache prevents them from being collected, but is also establishes a limit: if you loaded 20-30-10 items your cache length will be 30. With no cache you might have, in the worst case, 60 renderers.<br />
If you have an application with high variability (alternate loading of many and few data) it is better to have a policy in the setter, as explained above.<br />
In the &#8220;normal case&#8221; it depends on the implementation: e.g. if you use a Repeater component you can have a look at the generated code, if you code it your own you are responsible for that. My solution is just a way to have a controllable &#8220;centralized&#8221; mechanism to generate/delete renderers, so if there are issues about memory I know where to look in the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cesare</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10059</link>
		<dc:creator>Cesare</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:32:52 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10059</guid>
		<description>@Rob Thanks for your question. This depends on the policy of the cache setter. Instead of just adding the &quot;used&quot; renderer to the cache you can do a check on the length of the cache itself and, if greater than a given threshold, you can avoid to add it. To me, the only way to find the &quot;best&quot; value of the threshold is by experimentation, for it depends on many factors: the application, the number/frequency of queries, the number of returned results, the complexity of the renderer...</description>
		<content:encoded><![CDATA[<p>@Rob Thanks for your question. This depends on the policy of the cache setter. Instead of just adding the &#8220;used&#8221; renderer to the cache you can do a check on the length of the cache itself and, if greater than a given threshold, you can avoid to add it. To me, the only way to find the &#8220;best&#8221; value of the threshold is by experimentation, for it depends on many factors: the application, the number/frequency of queries, the number of returned results, the complexity of the renderer&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob McKeown</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10058</link>
		<dc:creator>Rob McKeown</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:31:11 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10058</guid>
		<description>Now that I think of it, wouldn&#039;t the fact that you are keeping a reference to extra renderers in your cache prevent them from ever being garbage collected? Where in the normal case they do eventually get collected?</description>
		<content:encoded><![CDATA[<p>Now that I think of it, wouldn&#8217;t the fact that you are keeping a reference to extra renderers in your cache prevent them from ever being garbage collected? Where in the normal case they do eventually get collected?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob McKeown</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10057</link>
		<dc:creator>Rob McKeown</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:17:45 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10057</guid>
		<description>In your caching example, the cache grows but never shrinks. In the case of a screen where you are loading data from the server, the cache may spike to display the contents of the longest collection. However, if you then load a set of data that is 10% of the previous one, your cache would still have far too many renderers cached. Is there a preferred technique for destroying unneeded renderers in a way that frees their memory?</description>
		<content:encoded><![CDATA[<p>In your caching example, the cache grows but never shrinks. In the case of a screen where you are loading data from the server, the cache may spike to display the contents of the longest collection. However, if you then load a set of data that is 10% of the previous one, your cache would still have far too many renderers cached. Is there a preferred technique for destroying unneeded renderers in a way that frees their memory?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cesare</title>
		<link>http://spreadingfunkyness.com/garbage-collection-with-flex-and-adobe-air/comment-page-1/#comment-10056</link>
		<dc:creator>Cesare</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:04:38 +0000</pubDate>
		<guid isPermaLink="false">http://spreadingfunkyness.com/?p=57#comment-10056</guid>
		<description>@Corey Thanks for stopping by. I will have a look at the new 10.1 player and see if it optimizes memory usage. When will it be released as final?</description>
		<content:encoded><![CDATA[<p>@Corey Thanks for stopping by. I will have a look at the new 10.1 player and see if it optimizes memory usage. When will it be released as final?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
