I'm trying to reduce the memory usage of a console application I have. It is supposed to run for hours on end, but it seems like the memory usage is gradually increasing with each second. It does use multiple threads, and does a variety of things, but I read somewhere that having a lot of calls to Console.WriteLine can also cause memory spikes.
Because the application is constantly writing to the console, I thought that maybe the memory usage is because of this. Unfortunately, I can't easily clear the console because I'm redirecting the output to a monitoring window. I've turned it off temporarily, but the memory is still increasing, which tells me there's other things I need to address.
Before I go about hunting down memory leaks, I was wondering if anyone can confirm/verify whether having thousands of Console.WriteLine's could cause a memory leak, or if that's already handled appropriately by the redirected output buffer. I've tried to do a search, but haven't found much on this.