Why does System.Threading.Timer stop on its own?

前端 未结 3 938
刺人心
刺人心 2020-12-06 16:17

I\'m doing a small test project before I use System.Threading.Timer in a Windows Service project. It\'s working wonderfully, however the timer stops on its own

3条回答
  •  醉话见心
    2020-12-06 16:53

    Garbage collector collected the timer object, you should keep a reference to it. this post will help: http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx

提交回复
热议问题