Re: [android-developers] Memory Leaks with a ListView

2010-10-20 Thread Kostya Vasilyev
John, I've seen something similar causing memory leaks, preventing GC from working, although not in Android: public class Item { static HashtablegHash = new Hashtable(); private String key; public Item(String key) { this.key = key; gHash.put(key, this); } public void finalize() {

[android-developers] Memory Leaks with a ListView

2010-10-19 Thread John Gaby
I have a class 'GListView' which extends ListView and acts as it's own adapter. It is declared thus: public class GListView extends ListView implements ListAdapter In it's constructor, I set it's adapter to itself as follows: public GListView(Context context ...) { ... setAdapter(this);