1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-25 10:22:16 -05:00
Go to file
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
application Hold MessageListAdapters and MessageListViews in DeckAdapter to avoid leaks 2011-06-08 23:11:28 +02:00
test Server: Fix typo in addConversation() 2011-03-15 23:59:49 +01:00
tools Fixed check_languages.rb script 2010-11-07 08:37:16 +01:00
.gitignore Moved config for build script to build.conf 2010-11-03 16:31:17 +01:00
build.conf.sample First version of a test scripts that starts the emulator and runs all tests 2010-11-07 10:21:11 +01:00
CHANGELOG Update CHANGELOG 2011-04-15 22:05:27 +02:00
CONTRIBUTORS Corrected CONTRIBUTORS list 2011-06-08 23:11:17 +02:00
LICENCE Added Licence (GPL v3) 2009-05-28 21:29:10 +02:00
README Added #yaaic to README 2011-02-05 14:07:16 +01:00
release.sh Fixed build script 2010-11-07 08:43:58 +01:00
test.sh Fix testrunner script 2011-03-06 11:49:33 +01:00

Yaaic - Yet Another Android IRC Client

Yaaic is as the full name already says an Internet Relay Chat (IRC)
client for Android devices.

--------------------------------------------------------------------

This is the source code distribution of Yaaic. If you are looking
for a compiled 'ready to use' version (APK), see the official
homepage at:

 http://www.yaaic.org

Yaaic is also avaiable at the official Android market.

If you are a developer and want to contribute to Yaaic, checkout
our repository at github:

 http://github.com/pocmo/Yaaic

The application project is located in application/ while the test/
folder contains unit and scenario tests. (Both folders are two
separate eclipse projects!)

Drop me a line for questions regarding Yaaic or use one of the
following ressources:

IRC:           irc.epd-me.net #yaaic
Homepage:      http://www.yaaic.org
Google Group:  http://groups.google.com/group/yaaic/
Twitter:       http://twitter.com/Yaaic
Facebook:      http://www.facebook.com/pages/Yaaic/359902798214

--------------------------------------------------------------------

Yaaic includes the PircBot IRC API written by Paul Mutton available
under the GNU General Public License (GPL). http://www.jibble.org

The Yaaic icon was designed by http://www.androidicons.com

Some icons are part of the Silk icon set designed by Mark James
available under the Creative Commons Licence Attribution 3.0
Licence. http://www.famfamfam.com

--------------------------------------------------------------------

Copyright 2009-2011 Sebastian Kaspari

Yaaic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Yaaic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Yaaic. If not, see http://www.gnu.org/licenses/