Memory Leak in EventLog from Service
-
I have a simple Windows Service. It is a timer loop, and when the timer expires it calls an external component to check if certain tasks need to be executed. I noticed it was leaking memory. The Service itself does nothing but call a function in the external component, and it creates one reference to this component at startup and keeps this single reference to the component throughout the service lifetime. At first I thought this might be a Timer problem, because it leaks memory every time the Elapse event expires. But after a lot of experimentation, I determined that the memory leak actually occurs because of a call to write an entry in an EventLog. If I remove the EventLog entry write from the Timer_Elaspe event, the memory leak goes away. I'm running Framework 1.1 on Win2K Service Pack 4. Anyone else seen this problem??