public static void PostInitialize(MutexEx masterMutex) { MutexEx.Leave(_GlobalStatics.InitMutex); // Go back under the static mutex and clean up the recursive mutex to prevent a resource leak. MutexEx.Enter(masterMutex); _GlobalStatics.InitMutexRefs--; if (_GlobalStatics.InitMutexRefs <= 0) { Debug.Assert(_GlobalStatics.InitMutexRefs == 0); MutexEx.Free(_GlobalStatics.InitMutex); _GlobalStatics.InitMutex.Tag = null; } MutexEx.Leave(masterMutex); }