<?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: Avoid memory leaks on Android</title>
	<atom:link href="http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 12:00:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Рецензії</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-3823</link>
		<dc:creator>Рецензії</dc:creator>
		<pubDate>Sun, 27 Jun 2010 09:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-3823</guid>
		<description>Занимательно тут у Вас. ) Надо будет еще заскочить.</description>
		<content:encoded><![CDATA[<p>Занимательно тут у Вас. ) Надо будет еще заскочить.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silknet</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-3780</link>
		<dc:creator>Silknet</dc:creator>
		<pubDate>Wed, 16 Jun 2010 09:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-3780</guid>
		<description>P thanks to your ideas , iТd adore to adhere to your weblog as usually as i can.possess a good day</description>
		<content:encoded><![CDATA[<p>P thanks to your ideas , iТd adore to adhere to your weblog as usually as i can.possess a good day</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arboleda</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-3769</link>
		<dc:creator>Arboleda</dc:creator>
		<pubDate>Sun, 13 Jun 2010 10:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-3769</guid>
		<description>Молодец, а я только недавно кому-то из блоггеров комментировал что «задолбали с постами на тему почему я перестал публиковать интересно почитать»)) Почему-почему, лень им стало, вот и перестали))</description>
		<content:encoded><![CDATA[<p>Молодец, а я только недавно кому-то из блоггеров комментировал что «задолбали с постами на тему почему я перестал публиковать интересно почитать»)) Почему-почему, лень им стало, вот и перестали))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renato Grottesi</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-2977</link>
		<dc:creator>Renato Grottesi</dc:creator>
		<pubDate>Mon, 02 Nov 2009 11:53:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-2977</guid>
		<description>Hi Romain,

does the 16 MB heap limitation also applies to OpenGL ES textures or SoundPool sound effects?
Since they are managed by native code, is it correct to affirm that there is no problem in using more than 16 MB of RAM in app/game resources/assets?
If it is possible right now, it is guarantee to be possible in the future?

Thank you in advance for your reply,
   Renato.</description>
		<content:encoded><![CDATA[<p>Hi Romain,</p>
<p>does the 16 MB heap limitation also applies to OpenGL ES textures or SoundPool sound effects?<br />
Since they are managed by native code, is it correct to affirm that there is no problem in using more than 16 MB of RAM in app/game resources/assets?<br />
If it is possible right now, it is guarantee to be possible in the future?</p>
<p>Thank you in advance for your reply,<br />
   Renato.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard G. Meng</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-2976</link>
		<dc:creator>Richard G. Meng</dc:creator>
		<pubDate>Mon, 02 Nov 2009 09:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-2976</guid>
		<description>Hi

Maybe I am wrong, but I am a little confused about the memory leak in the sample of this article, because, the setBackgroundDrawable reset the drawable&#039;s callback after the activity reloaded.

label.setBackgroundDrawable(sBackground);

And you can check the source of setBackgroundDrawable(...), 

public void setBackgroundDrawable(Drawable d) {
...
        if (d != null) {
...
            d.setCallback(this);
...
        }
...
}

This is SDK 1.6&#039;s code, maybe it&#039;s updated after this post. 

-M.G.</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Maybe I am wrong, but I am a little confused about the memory leak in the sample of this article, because, the setBackgroundDrawable reset the drawable&#8217;s callback after the activity reloaded.</p>
<p>label.setBackgroundDrawable(sBackground);</p>
<p>And you can check the source of setBackgroundDrawable(&#8230;), </p>
<p>public void setBackgroundDrawable(Drawable d) {<br />
&#8230;<br />
        if (d != null) {<br />
&#8230;<br />
            d.setCallback(this);<br />
&#8230;<br />
        }<br />
&#8230;<br />
}</p>
<p>This is SDK 1.6&#8242;s code, maybe it&#8217;s updated after this post. </p>
<p>-M.G.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitar Dimitrov</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-2868</link>
		<dc:creator>Dimitar Dimitrov</dc:creator>
		<pubDate>Fri, 21 Aug 2009 10:53:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-2868</guid>
		<description>Hi, Ramesh,

As you may know, long living references of Context aren&#039;t the only source of memory leak problems. I suggest you take a look at this video: http://www.youtube.com/watch?v=Dgnx0E7m1GQ

It won&#039;t give you answer right away, but it will show you how to find your problem with the SDK tools (which are great, I must say). Learn to use TraceView, HierarchyViewer and AllocationTracker; debugging will become much more fun and programming - much easier.

P.S. One question about the aforementioned getApplicationContext() and getApplication() methods - after reading the blog entry, I had the impression that they were static in Android 1.0/1.1, but now, in Cupcake, they are regular instance methods, am I right?

Regards,
Dimitar</description>
		<content:encoded><![CDATA[<p>Hi, Ramesh,</p>
<p>As you may know, long living references of Context aren&#8217;t the only source of memory leak problems. I suggest you take a look at this video: <a href="http://www.youtube.com/watch?v=Dgnx0E7m1GQ" rel="nofollow">http://www.youtube.com/watch?v=Dgnx0E7m1GQ</a></p>
<p>It won&#8217;t give you answer right away, but it will show you how to find your problem with the SDK tools (which are great, I must say). Learn to use TraceView, HierarchyViewer and AllocationTracker; debugging will become much more fun and programming &#8211; much easier.</p>
<p>P.S. One question about the aforementioned getApplicationContext() and getApplication() methods &#8211; after reading the blog entry, I had the impression that they were static in Android 1.0/1.1, but now, in Cupcake, they are regular instance methods, am I right?</p>
<p>Regards,<br />
Dimitar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-2825</link>
		<dc:creator>Ramesh</dc:creator>
		<pubDate>Fri, 31 Jul 2009 11:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-2825</guid>
		<description>Hi Guys,
 
     This Ramesh, I have one problem in my application &quot;Low memory No more process&quot;  I have one activity. this activity change the views corresponding action. after some my application hanged and exit automatically. last one week i struggle with this problem. I don&#039;t know what is the problem. I don&#039;t kept static Context variable. Please help me any body knows the solution.

Advance thanks
Ramesh</description>
		<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>     This Ramesh, I have one problem in my application &#8220;Low memory No more process&#8221;  I have one activity. this activity change the views corresponding action. after some my application hanged and exit automatically. last one week i struggle with this problem. I don&#8217;t know what is the problem. I don&#8217;t kept static Context variable. Please help me any body knows the solution.</p>
<p>Advance thanks<br />
Ramesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piwaï</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-2822</link>
		<dc:creator>Piwaï</dc:creator>
		<pubDate>Tue, 28 Jul 2009 16:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-2822</guid>
		<description>Great!

I have an applications with &quot;beans&quot; that are created once, and used in all activities of the application. I already have a kind of &quot;container&quot; that keeps the bean references, but when those beans have dependencies on a &quot;Context&quot; (injected in their constructor), it was kind of tricky to have them use the right Context.

I ended up creating a CurrentContextProxy that extends Context and delegates all its calls to a real Context that is an instance variable of CurrentContextProxy. This CurrentContextProxy is injected in the beans. 

Whenever an Activity comes to the front (onResume()), it updates the CurrentContextProxy with itself.

Althought this was better than recreating all beans for each activity, I will now use an Application context, much better :-).

Thanks !</description>
		<content:encoded><![CDATA[<p>Great!</p>
<p>I have an applications with &#8220;beans&#8221; that are created once, and used in all activities of the application. I already have a kind of &#8220;container&#8221; that keeps the bean references, but when those beans have dependencies on a &#8220;Context&#8221; (injected in their constructor), it was kind of tricky to have them use the right Context.</p>
<p>I ended up creating a CurrentContextProxy that extends Context and delegates all its calls to a real Context that is an instance variable of CurrentContextProxy. This CurrentContextProxy is injected in the beans. </p>
<p>Whenever an Activity comes to the front (onResume()), it updates the CurrentContextProxy with itself.</p>
<p>Althought this was better than recreating all beans for each activity, I will now use an Application context, much better :-).</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: n97 ohne vertrag</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-2776</link>
		<dc:creator>n97 ohne vertrag</dc:creator>
		<pubDate>Sat, 20 Jun 2009 15:06:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-2776</guid>
		<description>I enjoy your blog. Keep on the good work, I will subscribe. How do youthink of the new Nokia N97?</description>
		<content:encoded><![CDATA[<p>I enjoy your blog. Keep on the good work, I will subscribe. How do youthink of the new Nokia N97?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Вячеслав Сенников</title>
		<link>http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/comment-page-1/#comment-2715</link>
		<dc:creator>Вячеслав Сенников</dc:creator>
		<pubDate>Sun, 31 May 2009 11:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.curious-creature.org/?p=541#comment-2715</guid>
		<description>Что-то у меня в Firefox дизайн вашего сайта расползается...</description>
		<content:encoded><![CDATA[<p>Что-то у меня в Firefox дизайн вашего сайта расползается&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
