Blog

Insights about the app design and development ecosystem.

Mobile Development Android

Android Architecture Components: you are probably leaking ViewModel and might not know why

The Guide to app architecture suggests using ViewModel + Repository with LiveData in order to implement the data flow from Repository to ViewModel. If you use this approach or anything similar, there’s a high chance you could be leaking ViewModel. To help you understand and fix this issue, this article will briefly explain what a memory leak is, some of its implications, what happens when a ViewModel is leaked, why it happens and how to fix it for good.

Continue Reading