E
ermonnezzaro
Hi guys,
I am developing a windows services which periodically connects to a
database, fetches data in a dataset and do so work. I have chosen to
use a thread to do this job. Since the thread monitors the situations
every 2 hours, I put the thread in a sleep state. On my WinXp machine
everything works fine: memory grows to 200MB when loading data and goes
back to a normal state when I destroy the object. On a Win2003 server
things change a lot. When I start my service momory loaded is nearly
1Gb and it's never released. After few cicles it goes out of memory.
I am using a gc.collect before making the thread sleep ... but I am
scared of this. I was reading on few newgroup I could use a
Threading.Timer but I can't test this solution. Do you any idea?
Thanks
Alberto
I am developing a windows services which periodically connects to a
database, fetches data in a dataset and do so work. I have chosen to
use a thread to do this job. Since the thread monitors the situations
every 2 hours, I put the thread in a sleep state. On my WinXp machine
everything works fine: memory grows to 200MB when loading data and goes
back to a normal state when I destroy the object. On a Win2003 server
things change a lot. When I start my service momory loaded is nearly
1Gb and it's never released. After few cicles it goes out of memory.
I am using a gc.collect before making the thread sleep ... but I am
scared of this. I was reading on few newgroup I could use a
Threading.Timer but I can't test this solution. Do you any idea?
Thanks
Alberto