Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/15 16:03:20 (9 years ago)
Author:
ascheibe
Message:

#2419 properly stop timer for parsing when CodeEditor is closed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CodeEditor/3.4/LanguageFeatures/CodeCompletion/CodeCompletionStrategy.cs

    r12653 r12654  
    3737      this.codeEditor.TextEditorTextChanged += codeEditor_TextEditorTextChanged;
    3838      parserTimer = new Timer(1000);
    39       parserTimer.Elapsed += (sender, args) => Task.Run(() => DoParseStep());
     39      parserTimer.Elapsed += (sender, args) => Task.Run(() => {
     40        DoParseStep();
     41        if (codeEditor.IsDisposed && parserTimer.Enabled) {
     42          parserTimer.Stop();
     43          parserTimer.Dispose();
     44        }
     45      });
    4046    }
    4147
Note: See TracChangeset for help on using the changeset viewer.