critical section for Release()