Click here to Skip to main content
15,894,214 members

Comments by Silent Winter (Top 4 by date)

Silent Winter 23-Apr-11 16:50pm View    
I disagree with the statement "a timer will never be garbage collected while it is active". If the timer pointed to a third class's method, the third class would be collected - same as MyTimerData. I suspect that there is a global list - of timer delegates. Destroying the timer would remove the delegate & free the listener. I would need to see Microsoft's code to confirm this.
Silent Winter 23-Apr-11 16:35pm View    
Daniel Grunwald and orsobrown are in disagreement... I currently agree with Daniel Grunwald. But, if either of you know where you got your information; I would appreciate having a link there.
Silent Winter 23-Apr-11 16:29pm View    
I chose a WinForm application because I'm more familiar with them than command line applications. This timer was not intended to run on a UI thread. I apologize for any confusion.
Silent Winter 23-Apr-11 16:25pm View    
Thank you SAKryukov. This example was not intended to have practical sense. It is my test application to reproduce a problem in a larger application.