What causes a C # .NET memory leak in an application that is sitting idle?

I am trying to solve some memory leak problems in the application, and I really hope that someone here can offer me some ideas that will help. I've been doing this all day, and I'm afraid I'm completely stuck.

The application that I am trying to eliminate works initially, but becomes sluggish and possibly even crashes if it is used after a downtime for several hours. I assume this is due to some kind of memory leak, which worsens over time. As far as I know, there are no internal processes, such as timers or endless loops, etc., that can explain a memory leak, but the symptoms are reproducible, so something is definitely happening.

To try and solve this, I downloaded and installed a trial version of the .NET Memory Profiler. Unfortunately, I'm not quite sure how to interpret the results that I get. As far as I can tell, the classes that seem most problematic to me are system classes like System.Version and System.Object []. I think this is based on the assumption that “data to search” is the number of unreachable instances and bytes reported by the profiler.

Here are some examples of data similar to what I saw:

  • Namespace: System
    • Class Name: Version
    • Live instances ...
    • Total: 2
    • Delta: 0
    • Live Bytes ...
    • Total: 48
    • New: 48
    • Max: 24
    • Delta: 0
    • unreachable ...
    • Cases: 15,556
    • Byte: 373 344
  • Namespace: System
    • Class Name: Object []
    • Live instances ...
    • Total: 1,198
    • Delta: 0
    • Live Bytes ...
    • Total: 117,916
    • New: 117,916
    • Max: 7.016
    • Delta: 0
    • unreachable ...
    • Instances: 3,054
    • Byte: 204 592

, , , , 15 000 3000 , "", , , , "".

, :

  • - , .Net Memory?
  • , , , ?
+3
1

, . , . 0,5 , , .

, - , , . , . , . - , .

, . TaskMgr.exe, "". + , . .

. , . superuser.com

+5

Source: https://habr.com/ru/post/1732629/


All Articles