How to detect and fix Memory Leaks on Android with Android Studio
Вставка
- Опубліковано 18 вер 2024
- 🎓 Check out my 15+ hours Video Course "Kotlin Coroutines and Flow for Android Development"
🚀 Get it here: www.lukaslechn...
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: github.com/Luk...
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: www.lukaslechn...
Links:
Github Project: github.com/Luk...
Blog-Post (Android Studio Memory Profiler VS LeakCanary): www.lukaslechn...
➤ Subscribe to the channel: / @lukaslechner
🌎 Check out my website: www.lukaslechn...
📬 Subscribe to my newsletter: www.lukaslechn...
👨🎓 Learn Coroutines and Flow with my Github Example Repository: github.com/Luk...
➤ Follow me on twitter: / lukaslechnerdev
Why did you stop making video? This is really great content.
Hi! I am glad you like it! Lots of new videos are coming soon :-)
This really helped me a lot. Thank you so much! Just subscribed.
wow this was amazing, please record more profiler videos.
This helped find and fix memory leaks in my app that I was unaware of. Super, SUPER helpful. Thank you!
Thank you! We aslo have another option: Use Leak Canary to find memory leaks I think it's the easiest one)
Keep making such simple videos.
Thanks brother watched it before now I needed it 😉
VERY NICE, Talk about variables, how to best way to create them, THINKING about memory leak. THANKS
hats off to you sir! Great explanation.
It was very useful video. Thanks for this.
Great work Lukas :)
simple yet helpfull! thanks
Such a nice course😍😍
Absolutely brilliant video. thank you
Very usefull!!! thanks
thanks for shared it
Why are there applications that do not show the heap dump memory?
Clear
It's refreshed after using a movie or camera and going to another app, is there any solution?
Google needs to use these methods to fix the memory leaks in the UA-cam Android app. Crashes every evening, after getting laggy and tetchy for a few minutes. Or perhaps they need to find leaks and fragmentation within Android itself. YT clearly degrades after a day or so of use. Works great after I kill and restart it. Classic leak behaviour, memory or some other resource, but it may be in support libraries an not the app itself. Lame.
Helpful
Informative Video..Great !!!
Nice
Great Video, it helped me alot.. I followed your video and found out that there where unlimited numbers of variables instantiated inside a for loop and was not released which filled up the heap memory and even GC was not able to free up much space and the app results in crashing..So what should i do in this case..?
Hi! Glad you like it. I would need the full source code to be able to help you. Is it on GitHub?
@@lukaslechner Thanks for the concern... Problem has been solved...
How you sole the problem !@@joweltisso7365
Super erklärt! Da lerne ich auch noch was :) lg
Danke, freut mich!