Yaaic/application
Steven Luo ffe73b7c9f Hold MessageListAdapters and MessageListViews in DeckAdapter to avoid leaks
There are at least two significant memory leaks in Yaaic, which cause
the client to force close after a few hours with an
OutOfMemoryException:

(1) The IRCService holds Conversation objects, which contain a
MessageListAdapter, which have references to the ConversationActivity
context.  This causes Activity contexts to outlast the Activity, causing
a significant memory leak over time.

Fix this by holding the MessageListAdapter in the ConversationActivity's
DeckAdapter instead of in the Conversation objects.  The DeckAdapter's
lifecycle matches that of the Activity, so this prevents the leak.

(2) Every call to DeckAdapter.getView()/renderConversation() creates a
new MessageListView and adds it to the deck.  But adding the view to
the deck causes the deck to take a reference to the view, leaking the
MessageListView until the Activity is finished.  (This has the effect of
exacerbating the first leak, since the Activity context holds a
reference to the deck.)

Fix this leak by caching MessageListViews in the DeckAdapter, and
returning an existing MessageListView for a Conversation in getView() if
one already exists.
2011-06-08 23:11:28 +02:00
..
.settings Adjusted code formatter (eclipse) 2011-01-15 23:49:25 +01:00
res Add danish translation (By rasher) 2011-05-06 17:18:20 +02:00
src/org Hold MessageListAdapters and MessageListViews in DeckAdapter to avoid leaks 2011-06-08 23:11:28 +02:00
.classpath Remove tagsoup dependency. Improve mIRC color code parsing speed. 2011-03-27 19:42:05 +02:00
.project Merged application and test project into one repository 2010-11-07 08:35:45 +01:00
AndroidManifest.xml Updated version number: Yaaic 0.8 2011-04-15 22:00:55 +02:00
build.properties Merged application and test project into one repository 2010-11-07 08:35:45 +01:00
build.xml Merged application and test project into one repository 2010-11-07 08:35:45 +01:00
default.properties Target and minimum SDK Version set to 4 (Android 1.6) 2011-02-19 21:09:44 +01:00