Timers running leads to memory leak

gopalkrishna

New member
Joined
Jan 23, 2008
Messages
2
Programming Experience
3-5
I've vb.net windows application which have 3 timers and those timers will be running in a sequence of time interval. Each timer will call web service functions and access sql server also.

Once application started running those timers are running perfectly. But at certain point(after 5 min from starting) it leads to memory leak because it utilizes the maximum memory of the system.

I've been trying to solve this issue by disposing the objects used by the timers at the end of each inteval.But still it leads to the same...

I'm sure there is no mistake with my code. Could you please help me?
 
I'm quite sure there IS a mistake in your code. Timers are not going to be creating a memory leak on their own. You must be creating many objects and not releasing them. Without seeing your code it's not possible to say more other than you can read about best practice when it comes to memory management on MSDN or the Web. There's not much to it in .NET because the system does most of the work for you. You have to follow a few simple rules though.
 
Back
Top