If you want to immediately uninstall a hook, the only way is to dispose it. A disposed
hook is guaranteed to never invoke your handler again but may still consume
memory even for process life-time!
EasyHook (in EasyHook.dll) Version: 2.7.6684.0 (2.7.6684.0)
virtual void Dispose() sealed
abstract Dispose : unit -> unit
override Dispose : unit -> unit
As we are living in a manged world, you don't have to dispose a hook because the next
garbage collection will do it for you, assuming that your code does not reference it
anymore. But there are times when you want to uninstall it excplicitly, with no delay.
If you dispose a disposed or not installed hook, nothing will happen!