     
     deinit {
         self.delegate = nil
-
+        self.session = nil
+        
         self.removeApplicationObservers()
         self.removeSessionObservers()
         self.removeDeviceObservers()

        }
    }
    
    // stabilization
    
    public var photoStabilizationEnabled: Bool

        self.previewLayer.session = nil
            
        self.currentDevice = nil
        self.cicontext = nil
        
        self.captureSession = nil
