Search code examples
androidmemory-leaksleakcanary

Android Memory leak on reference view


I've wrote a simple HTTP request, that handles my HTTP requests so i don't want to use a library

everything works with the requests but there are a few memory leaks, I have found a memory leak but i don't know how to solve it

This is my file class

https://gist.github.com/BioGram/6e7a6ae927e76046ee1aa5d5e7b3ff57#file-requesthandler-java-L173

line 173 that BitmapView will leaks

Would be appreciated, if you provide a solution


Solution

  • I've found a better solution, Instead of using a direct reference using a bitmap callback so problem solve

    Updated Version: https://github.com/BioGram/Android/commit/e981bd225e1960aec2ddee58461dde1e64db2c61