Finding MEMORY LEAKS in C# .NET Applications

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ธ.ค. 2024

ความคิดเห็น • 42

  • @tutorialsEUC
    @tutorialsEUC  2 ปีที่แล้ว +1

    🚀C# Progress Academy - Become a senior C# developer: academy.tutorials.eu/p/csharp-progress-academy

  • @gavinw77
    @gavinw77 11 หลายเดือนก่อน +9

    @tutorialsEUC Note that the 'gcroot' command that you use here will no longer work as of 2023. They have dropped the -all option, as the tool and system are apparently fast enough now to just do -all everytime. So the correct usage is > gcroot

  • @bogdan98ful
    @bogdan98ful ปีที่แล้ว +11

    No memory leak, just increase of used memory due to the fact of using a static list.

    • @MasterOfMisc
      @MasterOfMisc 2 หลายเดือนก่อน

      Yeah, came here to say that.

  • @ishaarora3
    @ishaarora3 ปีที่แล้ว +7

    Is it because the list is static and not collected by GC, there is having a memory leak? Could you please also explain why is there a memory leak here?

    • @kexforlecture
      @kexforlecture ปีที่แล้ว

      Exactly because the list is static, and it can't be collected, I think. Anyway, it's just an example.

    • @bhanuprakashrao1460
      @bhanuprakashrao1460 ปีที่แล้ว +7

      It's not a memory leak. It just unbounded memory increase. This tutorial helps in debugging such issues, which causes the memory of the application to increase over time.
      Its very hard to write code which leaks memory in languages like c#, since most of the code is managed. Only when you ( or the SDK you use) are not properly handling un-managed resources ( not disposing the IDisposible classes etc), do we get a memory leak and even then it is not a leak in managed code and so hard to debug using this method.

  • @rpreviato
    @rpreviato 3 หลายเดือนก่อน

    Your video help me to fix an issue on a Worker service I was working with, that was accumulating 25GB of RAM over few days. Thank you!

  • @EdRawrDev5813
    @EdRawrDev5813 7 หลายเดือนก่อน

    Quick questions , what is the average GC heap size for a Mobile Xamarin or Maui app ? It could be any app but I'm asking about a mobile app environment?

  • @ncvjr
    @ncvjr ปีที่แล้ว +3

    Ok. In the real world application we have many threads, Lists, Arrays and probably the performance issue is not obvious like all examples about .net profiling. I need to study much more about this topic.

  • @SakthiVel-hq6zu
    @SakthiVel-hq6zu ปีที่แล้ว +3

    gcroot -all [targetid] cmd is not working

  • @alexnovikov4356
    @alexnovikov4356 ปีที่แล้ว

    i know Microsoft recommends this, but all that is available in VS even in community edition. no need typing commands just using the profilers in VS.

  • @sleepless-nite
    @sleepless-nite ปีที่แล้ว

    Why my program is not showing in the monitor list?

  • @WaeilDaoud
    @WaeilDaoud 10 หลายเดือนก่อน

    I learn some new CMD, Thanks. Add the fix for such code to make it consume less memory, then compare the result, it will be more helpful.

  • @DelMadman
    @DelMadman 7 หลายเดือนก่อน

    very helpful, saved my day! thanks

  • @nursultanesirkegenov3289
    @nursultanesirkegenov3289 ปีที่แล้ว

    Why just don't use Memory snapshot in VS and analyze by comparing two snapshots?

  • @user-kr9gc6ys2
    @user-kr9gc6ys2 ปีที่แล้ว

    It is really helpful guide:)
    Thanks for the help:)

  • @hiryu70
    @hiryu70 ปีที่แล้ว +1

    But if I have a leak only on production environment how can I get this dump and analyze it?

  • @FranciscoAlvino
    @FranciscoAlvino 2 ปีที่แล้ว

    Wow!! Thanks for it 👏🏻👏🏻👏🏻

  • @SakthiVel-hq6zu
    @SakthiVel-hq6zu ปีที่แล้ว

    gcroot -all cmd is not working

  • @Cod3rMax
    @Cod3rMax 2 ปีที่แล้ว +2

    This topic i find it very complicated, couldn't understand it 😢

    • @tutorialsEUC
      @tutorialsEUC  2 ปีที่แล้ว

      hi, what exactly don't you understand? :)

  • @rodrigoramirez3870
    @rodrigoramirez3870 ปีที่แล้ว

    Great video!

  • @ЧегевараЖив
    @ЧегевараЖив 8 หลายเดือนก่อน

    my Debian can not find dotnet-counters after installing. I'm destroyed

  • @baebcbcae
    @baebcbcae ปีที่แล้ว +3

    cool, but unfortunately it is not memory leak

    • @darkmalk94
      @darkmalk94 ปีที่แล้ว

      What do you mean?

  • @DutchRider
    @DutchRider ปีที่แล้ว +2

    Such a bad practise, you can do this all within visual studio itself, no need to install more tools..

    • @tutorialsEUC
      @tutorialsEUC  ปีที่แล้ว +1

      Hi, Microsoft themself suggest to use this tool for first-level performance investigation: learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters
      I'd not say that this is a bad practicse but an introduction into the world of performance monitoring at all.
      Greets,
      Jannick

    • @DutchRider
      @DutchRider ปีที่แล้ว +1

      @@tutorialsEUC it's very bad though, and I fully don't understand why they are doing this, while in your diagnostics window you've everything you need :) nonetheless your video is still helpfull to search what you need cuz it's basically the same steps (just saves some typing and installing tools ;))

    • @tutorialsEUC
      @tutorialsEUC  ปีที่แล้ว

      @@DutchRider Thanks for your honest opinion! 🙂

    • @dellosCao
      @dellosCao ปีที่แล้ว

      still dont know how to done this in VS, Can you show me content

  • @emmacox9506
    @emmacox9506 2 ปีที่แล้ว

    p͎r͎o͎m͎o͎s͎m͎ 😏