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

КОМЕНТАРІ • 30

  • @haseebpavaratty6249
    @haseebpavaratty6249 4 роки тому +6

    Why did you stop making video? This is really great content.

    • @lukaslechner
      @lukaslechner  4 роки тому +8

      Hi! I am glad you like it! Lots of new videos are coming soon :-)

  • @James-nf4tm
    @James-nf4tm 3 роки тому +1

    This really helped me a lot. Thank you so much! Just subscribed.

  • @alexanderk9767
    @alexanderk9767 3 роки тому +3

    wow this was amazing, please record more profiler videos.

  • @JesusChristIsLord__
    @JesusChristIsLord__ 3 роки тому

    This helped find and fix memory leaks in my app that I was unaware of. Super, SUPER helpful. Thank you!

  • @nymexe
    @nymexe Рік тому

    Thank you! We aslo have another option: Use Leak Canary to find memory leaks I think it's the easiest one)

  • @sameershelar2000
    @sameershelar2000 3 роки тому +1

    Keep making such simple videos.

  • @iftak01
    @iftak01 2 роки тому +1

    Thanks brother watched it before now I needed it 😉

  • @MaisUmSomente
    @MaisUmSomente 2 роки тому

    VERY NICE, Talk about variables, how to best way to create them, THINKING about memory leak. THANKS

  • @abhasarya5394
    @abhasarya5394 3 роки тому +1

    hats off to you sir! Great explanation.

  • @TheMohit987
    @TheMohit987 3 роки тому +1

    It was very useful video. Thanks for this.

  • @prasannakumarnair2724
    @prasannakumarnair2724 3 роки тому +1

    Great work Lukas :)

  • @igabuts
    @igabuts 9 місяців тому

    simple yet helpfull! thanks

  • @yousefkazemi6130
    @yousefkazemi6130 Рік тому +1

    Such a nice course😍😍

  • @2chotti
    @2chotti 2 роки тому

    Absolutely brilliant video. thank you

  • @brunodiaz6100
    @brunodiaz6100 Рік тому +1

    Very usefull!!! thanks

  • @davejackson88
    @davejackson88 11 місяців тому

    thanks for shared it

  • @jaisoncarlos848
    @jaisoncarlos848 2 роки тому

    Why are there applications that do not show the heap dump memory?

  • @devdeeds
    @devdeeds 3 роки тому +1

    Clear

  • @uio86a
    @uio86a 2 роки тому

    It's refreshed after using a movie or camera and going to another app, is there any solution?

  • @tristan7216
    @tristan7216 Рік тому +1

    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.

  • @manshalkhatri9289
    @manshalkhatri9289 Рік тому

    Helpful

  • @simplyyamraj
    @simplyyamraj 4 роки тому +1

    Informative Video..Great !!!

  • @_XY_
    @_XY_ 2 роки тому +1

    Nice

  • @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 роки тому +1

      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 роки тому +1

      @@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