androidmemory-leaksout-of-memoryandroid-volleyeclipse-memory-analyzer

Eclipse MAT shows memory leak due to Volley NetworkDispatcher and CacheDispatcher


This is excluding weak references

I'm new to MAT and how to detect and remove leaks, but why is volley behind all my leaks?

How can I solve this?


Solution

  • The problem was i wasn't using a Singleton Pattern for my RequestQueues https://developer.android.com/training/volley/requestqueue.html#singleton This link solved my problem

    Also @Turnsole 's advice is solid, will be sure to cancel requests when I don't need them anymore