Click or drag to resize

LocalHookDispose Method

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!

Namespace:  EasyHook
Assembly:  EasyHook (in EasyHook.dll) Version: 2.7.6684.0 (2.7.6684.0)
Syntax
public void Dispose()

Implements

IDisposableDispose
Remarks
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!
See Also