class Disposable{
  constructor(callback){
    this.disposed = false
    this.callback = callback
  }
  dispose(){
    if(this.disposed) return
    this.callback()
    this.callback = null
  }
}
module.exports = Disposable

@@ -137,16 +137,41 @@
  return%0A
+    if(this.callback)%7B%0A  
     this
@@ -182,16 +182,18 @@
 lback()%0A
+  
     this
@@ -209,16 +209,22 @@
  = null%0A
+    %7D%0A
   %7D%0A%7D%0Amo

Allow null callback in DIsposable