It's the same code but with all declarations inside of OnStartUp()
The OnTermination() contains
protected override void OnTermination()
{
secondtimer.Stop();
secondtimer.Dispose();
// Cleans up our Timer object
}
but the timer continues to get fired randomly even after i call Dispose()
Comment