Hello everybody!
I have a windows service, which is configured to send emails in a predefined schedule. The schedule works with System.Timers.Timer and every time the Timer_Elapsed is raised I call Timer.Stop(), send emails (each time about 1500 emails), calculate the amount of time the next tick will be raised and start the timer (calling Timer.Start() method). The problem is when the timer is elapsed and the process started sending emails, the memory in use increases but not decreases after finishing. When I call the function in a "not timered" application, the used memory is freed up after finishing sending process. Can anybody help me to understand why this is going on? Maybe there's something concerning to threads used in timer?
Thanks in advance.