check this post: http://android-developers.blogspot.ru/2009/01/avoiding-memory-leaks.html