Taking a snapshot clears the memory but otherwise the memory keeps growing in our .net web app

Taking a snapshot clears the memory but otherwise the memory keeps growing in our .net web app hosted on iis. Does it mean it will be cleared eventually or should I force a GC

1 comment
Comment actions Permalink

Garbage collection is called automatically according to the algorithms. For example, GC have to be called if memory resources are insufficient. Objects will be collected if they are no longer in use by the application. Usually, you don't need to force GC from your application, GC should be called automatically when it really needs. Furthermore, If you call GC very often from your application, it can affect app's performance.

If managed memory usage grows fast and this memory is collected after the first GC, probably your application generates a lot of memory traffic. Please read more about memory traffic here: https://www.jetbrains.com/help/dotmemory/Analyzing_Traffic.html

0

Please sign in to leave a comment.