Delete critical section, created in initialization functions

Added deletion of critical sections created in various initialization function (windows-only)