anchor.diff:  
                       treeView.ExpandAll())
                   Gdk.Threads.Leave()
  +                timerId <- 0u
           | None -> ()
   
           refreshingOutline <- false
           false
   
  -    let updateDocumentOutline _ =
  +    member private x.updateDocumentOutline _ =
         if not refreshingOutline then
           refreshingOutline <- true
  -        GLib.Timeout.Add (1000u, (fun _ -> refillTree())) |> ignore
  +        timerId <- GLib.Timeout.Add (1000u, (fun _ -> refillTree()))
   
       override x.Initialize() =
           base.Initialize()
  -        x.DocumentContext.DocumentParsed.Add(updateDocumentOutline)
  +        handler <- x.DocumentContext.DocumentParsed.Subscribe(fun o e -> x.updateDocumentOutline())
  +        ()
  +
  +    override x.Dispose() =
  +        handler.Dispose()
  +        if timerId > 0u then
  +            GLib.Source.Remove timerId |> ignore
  +        timerId <- 0u
  +        base.Dispose()
   
       override x.IsValidInContext context =
           LanguageBindingService.GetBindingPerFileName (context.Name) <> null;
  
positive.code:                 treeCol.SetCellDataFunc(padTreeView.TextRenderer, new TreeCellDataFunc(setCellText))
  
                  padTreeView.AppendColumn treeCol |> ignore
                  padTreeView.Realized.Add(fun _ -> treeViewRealized <- true; refillTree |> ignore)
                  padTreeView.Selection.Changed.Subscribe(fun _ -> jumpToDeclaration false) |> ignore
                  padTreeView.RowActivated.Subscribe(fun _ -> jumpToDeclaration true) |> ignore
  
  
negative.code:     inherit TextEditorExtension()
      let mutable treeView : PadTreeView option = None
      let mutable refreshingOutline : bool = false
      let mutable timerId : uint32 = 0u
      let mutable handler : IDisposable = null
  
      let refillTree() =
          match treeView with
          | Some(treeView) ->
              let ast = maybe { let! context = x.DocumentContext |> Option.ofNull
                                let! parsedDocument = context.ParsedDocument |> Option.ofNull
                                let! ast = parsedDocument.Ast |> Option.tryCast<ParseAndCheckResults>
                                return ast }
  
              DispatchService.AssertGuiThread()
              Gdk.Threads.Enter()
              refreshingOutline <- false
  
              if treeView.IsRealized then
                  ast |> Option.iter (fun ast ->
                      let treeStore = treeView.Model :?> TreeStore
                      treeStore.Clear()
  