private static Timer _timer;
...
_timer = new Timer(_registrarCallback, textWriter, 0, registrarUpdateInMillisec);
This morning I learned why it needs that reference. Without the reference to the Timer object it can be garbage collected before it ever fires.
No comments:
Post a Comment