windows - C# console logging: will it have memory issues? -


So I'm working with a console app that will continue for days, weeks or months at a time.

This logs useful information in a text file, but it also writes for the console. Do I need to worry about console memory that is not being purified for some reason it seems ok?

I wrote a little test to run during lunch. I added some randomly-expanded letters so that my colleagues feel that I should have some big processing and can take more lunch.

 For  (Int64 i = 0; i & lt; 100000000000000000000; i ++) {string Random = Path. GetRandomFileName (); Random = Random. Replay (".", ""); Random = random.Replace ("m", ""); Random = random.Replace ("a", ""); Random = random.Replace ("h", ""); Console.light line ("I" + + + + + + random);}   

Therefore, the memory appears stable without writing the file. I just want some confirmation that if I have Memory problem, it is not from the console ...

The memory never climbs even if I log in it in a text file.

This logs useful information in a text file, but it also writes on the console. There is a need to worry about consoles memory that is not being purified for some reason it seems that it is okay.

Unless your console is heavy Is not set for buffer, or it is redirected to an in-memory file system, or something like that. In normal circumstances, it should be OK.

Comments