public static void FreeCamera() { lock (lockObject) { Debug.Assert(CamUseCnt == 0); if (s_camera != null) { s_camera.Dispose(); s_camera = null; } } }
public OperationResult Disconnect(Session session) { if (_camera.CanSetCCDTemperature) { _camera.CoolerOn = false; } _camera.Connected = false; _camera.Dispose(); _camera = null; session.Camera.DisconnectCamera(); session.Cooler.SetAvailable(false); return(OperationResult.Ok); }
public void Dispose() { if (MyDriverType == 0) { MySSCamera.Dispose(); } else { // Clean up the tracelogger and util objects tl.Enabled = false; tl.Dispose(); tl = null; utilities.Dispose(); utilities = null; astroUtilities.Dispose(); astroUtilities = null; } }