private void Free( ) { lock ( sync ) { thread = null; // release events if ( stopEvent != null ) { stopEvent.Close( ); stopEvent = null; } camera.Close( ); } }