Trust the garbage collector and stop worrying. 150 megabytes is nothing. You do not even measure file size; most of them will be code.
If you are worried about where the memory goes, start by understanding how memory works in a modern operating system. You need to understand the difference between virtual and physical memory, the difference between allocated and allocated memory and all this, before you start throwing numbers, for example, β150 megabytes of allocated memoryβ. Remember that you have 2,000 megabytes of virtual address space in a 32-bit process; I would not have thought that the 150 millionth process is great.
As John says, you should worry about the slow growth of private bytes. If this does not happen, then you do not have a memory leak. Let the garbage collector do his job and not worry about it.
If you are still worried about this, then good heavens do not use task manager. Get a memory profiler and learn how to use it. The task manager is designed to check processes by looking at them from a height of 30,000 feet. You need to use a microscope, not a telescope, to analyze how a process frees the bytes of a single file.
source share