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

    
    deinit {
        self.delegate = nil

        self.removeApplicationObservers()
        self.removeSessionObservers()
        self.removeDeviceObservers()

        }
    }
    
    // recording session
    
    public var session: NextLevelSession? {
        get {
            if let session = self.recordingSession {
                return session
            }
            return nil
        }
        
        set {
            if self.recordingSession != newValue {
                self.executeClosureSyncOnSessionQueueIfNecessary {
                    self.recordingSession = newValue
                }
            }
        }
    }
    
    // stabilization
    
    public var photoStabilizationEnabled: Bool
