I was coding a console application in C#, and my code was like this:
while(true)
{
//do some stuff
System.Threading.Thread.Sleep(60000)
}
I noticed the memory usage of my application was about 14k while "sleeping". But then I referenced System.Windows.Forms and used a timer instead and I noticed huge drop in memory usage.
My question is, what is the proper way of making something execute every few seconds without using that much memory?