How to detect and fix Memory Leaks on Android with Android Studio

  Рет қаралды 37,824

Lukas Lechner - Advanced Android Development

Lukas Lechner - Advanced Android Development

Күн бұрын

🎓 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

Пікірлер: 30
@haseebpavaratty6249
@haseebpavaratty6249 4 жыл бұрын
Why did you stop making video? This is really great content.
@lukaslechner
@lukaslechner 4 жыл бұрын
Hi! I am glad you like it! Lots of new videos are coming soon :-)
@JesusChristIsLord__
@JesusChristIsLord__ 3 жыл бұрын
This helped find and fix memory leaks in my app that I was unaware of. Super, SUPER helpful. Thank you!
@alexanderk9767
@alexanderk9767 3 жыл бұрын
wow this was amazing, please record more profiler videos.
@nymexe
@nymexe Жыл бұрын
Thank you! We aslo have another option: Use Leak Canary to find memory leaks I think it's the easiest one)
@James-nf4tm
@James-nf4tm 3 жыл бұрын
This really helped me a lot. Thank you so much! Just subscribed.
@sameershelar2000
@sameershelar2000 3 жыл бұрын
Keep making such simple videos.
@iftak01
@iftak01 2 жыл бұрын
Thanks brother watched it before now I needed it 😉
@abhasarya5394
@abhasarya5394 3 жыл бұрын
hats off to you sir! Great explanation.
@TheMohit987
@TheMohit987 3 жыл бұрын
It was very useful video. Thanks for this.
@MaisUmSomente
@MaisUmSomente 2 жыл бұрын
VERY NICE, Talk about variables, how to best way to create them, THINKING about memory leak. THANKS
@prasannakumarnair2724
@prasannakumarnair2724 3 жыл бұрын
Great work Lukas :)
@2chotti
@2chotti 2 жыл бұрын
Absolutely brilliant video. thank you
@yousefkazemi6130
@yousefkazemi6130 Жыл бұрын
Such a nice course😍😍
@igabuts
@igabuts 9 ай бұрын
simple yet helpfull! thanks
@tristan7216
@tristan7216 Жыл бұрын
Google needs to use these methods to fix the memory leaks in the KZbin 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.
@brunodiaz6100
@brunodiaz6100 Жыл бұрын
Very usefull!!! thanks
@davejackson88
@davejackson88 11 ай бұрын
thanks for shared it
@manshalkhatri9289
@manshalkhatri9289 Жыл бұрын
Helpful
@jaisoncarlos848
@jaisoncarlos848 2 жыл бұрын
Why are there applications that do not show the heap dump memory?
@uio86a
@uio86a 2 жыл бұрын
It's refreshed after using a movie or camera and going to another app, is there any solution?
@devdeeds
@devdeeds 3 жыл бұрын
Clear
@_XY_
@_XY_ 2 жыл бұрын
Nice
@simplyyamraj
@simplyyamraj 4 жыл бұрын
Informative Video..Great !!!
@joweltisso7365
@joweltisso7365 4 жыл бұрын
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..?
@lukaslechner
@lukaslechner 4 жыл бұрын
Hi! Glad you like it. I would need the full source code to be able to help you. Is it on GitHub?
@joweltisso7365
@joweltisso7365 4 жыл бұрын
@@lukaslechner Thanks for the concern... Problem has been solved...
@blackballization
@blackballization 10 ай бұрын
How you sole the problem !@@joweltisso7365
@waldschratler
@waldschratler 4 жыл бұрын
Super erklärt! Da lerne ich auch noch was :) lg
@lukaslechner
@lukaslechner 4 жыл бұрын
Danke, freut mich!
Deep dive into Android Studio Profilers (Android Dev Summit '18)
41:28
Android Developers
Рет қаралды 40 М.
How to avoid 5 common Kotlin Coroutine mistakes
15:59
Lukas Lechner - Advanced Android Development
Рет қаралды 4,8 М.
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 51 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 17 МЛН
Je peux le faire
00:13
Daniil le Russe
Рет қаралды 22 МЛН
How to Validate Forms with Clean Architecture (You're Doing it Wrong)
41:08
MVVM  / MVI Repository Pattern with Hilt
1:00:24
CodingWithMitch
Рет қаралды 67 М.
How to Make Your Code Clean With Kotlin Sealed Classes
18:09
Philipp Lackner
Рет қаралды 41 М.
Best Practices for using Kotlin Coroutines in Android Development
21:35
Lukas Lechner - Advanced Android Development
Рет қаралды 3,4 М.
Profiling Android Apps
40:27
GDG Boston Android
Рет қаралды 737
Android Studio: Debugging tips n' tricks (Android Dev Summit '19)
18:58
Android Developers
Рет қаралды 57 М.
How TOR Works- Computerphile
14:19
Computerphile
Рет қаралды 1,7 МЛН
Bound Services on Android
43:00
CodingWithMitch
Рет қаралды 62 М.
Demystify the data in Android Studio Profilers (Android Dev Summit '19)
19:27
How to connect electrical wires with good contact #short
0:29
Tuan CT
Рет қаралды 11 МЛН
iPhone 16 Pro - ПЕРВЫЙ обзор!
0:59
808
Рет қаралды 81 М.
iPhone 16/16 Pro Unboxing: End of an Era!
11:21
Marques Brownlee
Рет қаралды 6 МЛН