What are ways to solve Memory Leaks in C#

前端 未结 10 1763
生来不讨喜
生来不讨喜 2021-02-14 14:50

I\'m learning C#. From what I know, you have to set things up correctly to have the garbage collector actually delete everything as it should be. I\'m looking for wisdom learn

10条回答
  •  无人及你
    2021-02-14 15:51

    I recommend using .NET Memory Profiler

    .NET Memory Profiler is a powerful tool for finding memory leaks and optimizing the memory usage in programs written in C#, VB.NET or any other .NET Language.

    .NET Memory Profiler will help you to:

    • View real-time memory and resource information
    • Easily identify memory leaks by collecting and comparing snapshots of .NET memory
    • Find instances that are not properly disposed
    • Get detailed information about unmanaged resource usage
    • Optimize memory usage
    • Investigate memory problems in production code
    • Perform automated memory testing
    • Retrieve information about native memory

    Take a look at their video tutorials:

    http://memprofiler.com/tutorials/

提交回复
热议问题