From baf71492a23fc5d74e7a4bb90eccece425d2835a Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Wed, 21 Jun 2017 10:21:40 -0400 Subject: [PATCH] `.dispose()` all subscribers on a NativeWatcher --- src/filesystem-manager.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/filesystem-manager.js b/src/filesystem-manager.js index 5d4c6408a..7cea7f298 100644 --- a/src/filesystem-manager.js +++ b/src/filesystem-manager.js @@ -105,6 +105,11 @@ class NativeWatcher { this.emitter.emit('did-stop') } + // Private: Detach any event subscribers. + dispose () { + this.emitter.dispose() + } + // Private: Callback function invoked by the native watcher when a debounced group of filesystem events arrive. // Normalize and re-broadcast them to any subscribers. //