C# working set memory keeps increase with every call to a method
I programmed a c# program that has a timer.
this timer will call a method.
but every time when the method is called,
the working memory of that program keeps increase
does anyone know what is wrong with my program

naura paxRank #2,843 · 502 reputationPosted Oct 29, 2009, 10:19 PM EDT
Have you set the tick event of timer at runtime if yes then exactly at which event?
if you have subscribed to event handler using code then you can unsubscribe it at that time:
timer1.tick-=new System.EventHandler(this.timer1_Tick);
timer1.tick+=new System.EventHandler(this.timer1_Tick);
hope i'm close.
goh14 reputationPosted Oct 29, 2009, 10:27 PM EDT
goh14 reputationPosted Oct 29, 2009, 10:32 PM EDT
theLizardRank #1,079 · 1.8K reputationPosted Oct 29, 2009, 10:35 PM EDT
goh14 reputationPosted Oct 29, 2009, 10:41 PM EDT
goh14 reputationPosted Oct 29, 2009, 10:42 PM EDT
naura paxRank #2,843 · 502 reputationPosted Oct 29, 2009, 10:42 PM EDT
goh14 reputationPosted Oct 29, 2009, 10:48 PM EDT
naura paxRank #2,843 · 502 reputationPosted Oct 29, 2009, 11:02 PM EDT
are you building your application in debug mode? if yes then you should try to build it in release mode and then deploy, that might just make a difference.
theLizardRank #1,079 · 1.8K reputationPosted Oct 29, 2009, 11:05 PM EDT
you must also first check that these are not null otherwise you will get errors.
goh14 reputationPosted Oct 29, 2009, 11:11 PM EDT
theLizardRank #1,079 · 1.8K reputationPosted Oct 29, 2009, 11:23 PM EDT
You obviously have memory leak but without seeing code it would be dificult to determine where the problem is.