How to detect and fix Memory Leaks on Android with Android Studio
🎓 Check out my 9+ hours Video Course “Mastering Kotlin Coroutines for Android Development”
🚀 Get it here: https://www.udemy.com/course/coroutines-on-android/?referralCode=EE8CCB9284B14877724C
This video shows how you can detect and fix Memory leaks on Android with the help of the new “Leak Detection” feature that was introduced with Android Studio 3.6.
I created a sample application with a memory leak: https://github.com/Lukle/Memory-Leak-Example
In the video, I show how you can use the Android Studio Memory Profiler to detect that leak and then find out what causes the Memory Leak.
In the end, we are going to fix the Memory Leak.
You will also learn about what Memory Leaks actually are and how they can emerge.
You should also consider using the popular library “LeakCanary” for finding and fixing memory leaks. I wrote a blog post where I compare the Leak Detection feature of Android Studio with LeakCanary: https://www.lukaslechner.com/do-we-still-need-leakcanary-now-that-android-studio-3-6-has-memory-leak-detection/
Links:
Github Project: https://github.com/Lukle/Memory-Leak-Example
Blog-Post (Android Studio Memory Profiler VS LeakCanary): https://www.lukaslechner.com/do-we-still-need-leakcanary-now-that-android-studio-3-6-has-memory-leak-detection/
➤ Subscribe to the channel: https://www.youtube.com/channel/UCr9FeEqCspjGTiOc3HplCqw?sub_confirmation=1
🌎 Check out my website: https://www.lukaslechner.com
📬 Subscribe to my newsletter: https://www.lukaslechner.com/newsletter/
👨🎓 Learn Coroutines and Flow with my Github Example Repository: https://github.com/LukasLechnerDev/Kotlin-Coroutine-Use-Cases-on-Android
➤ Follow me on twitter: https://twitter.com/LukasLechnerDev
Views :24342
android studio
Source by Lukas Lechner – Advanced Android Development