I\'m working on 2 Windows Services that have a common database which I want to lock (cross-process) with a system Mutex.
Now I\'m wondering whether it\'s ok to just
You need to dispose the resources which are used by the waithandle.
From the documentation:
Releases all resources used by the current instance of the WaitHandle class. (Inherited from WaitHandle.)
The waithandle uses unmanaged resources which should be disposed at the end of use.
MSDN Documentation Mutex