<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Furthermore the ThumbnailerManager is now a singleton so it can be<br>
accessed indifferently from the MainActivity or the VideoListFragment.<br></blockquote><div><br>I'm don't think bringing a singleton here is a good idea, Android can decide to destroy the MainActivity or the VideoListFragment when they are not displayed.<br>
- Because the ThumbnailManager hold a reference to them, they won't be garbage collected => memory leak<br>- when a new MainActivity/VideoListFragment will try to use ThumbnailManager, ThumbnailManager will try to use an old invalid MainActivity/VideoListFragment => it will surely crash<br>
<br>That's why i removed context singletons or singletons which holds contexts back in frebruary (around 2012/02/18 & 2012/02/19).<br><br>see here : <a href="http://android-developers.blogspot.fr/2009/01/avoiding-memory-leaks.html">http://android-developers.blogspot.fr/2009/01/avoiding-memory-leaks.html</a><br>
<br></div></div>