 
     self.unsortedScoredUrls.removeAll()
     self.searchField.stringValue = ""
+    self.perSessionDisposeBag = DisposeBag()
   }
 
   func windowDidResignKey(_: Notification) { self.window.performClose(self) }

  required init(source: Observable<StateType>, emitter: ActionEmitter, state: StateType) {
    self.emit = emitter.typedEmit()
    self.windowController = NSWindowController(windowNibName: NSNib.Name("OpenQuicklyWindow"))

    super.init()


    self.cwdPathCompsCount = cwd.pathComponents.count
    self.cwdControl.url = cwd

    self.searchStream
      .observeOn(MainScheduler.instance)
      .subscribe(onNext: { [weak self] pattern in
        guard let fileService = self?.fileServicesPerRootUrl[cwd] else { return }
        self?.scanAndScore(pattern, with: fileService)
      })
      .disposed(by: self.perSessionDisposeBag)

    self.windowController.showWindow(self)
  }
