提交 3e6aefce 编写于 作者: C CyrusNajmabadi

Merge pull request #4336 from CyrusNajmabadi/taggerDisposal

Dispose tagger when we're done with it.
......@@ -145,10 +145,12 @@ protected override void SetupNewTextView(IVsTextView textView)
var snapshot = subjectBuffer.CurrentSnapshot;
var fullSpan = new SnapshotSpan(snapshot, start: 0, length: snapshot.Length);
var tagger = outliningTaggerProvider.CreateTagger<IOutliningRegionTag>(subjectBuffer);
using (var disposable = tagger as IDisposable)
{
tagger.GetAllTags(new NormalizedSnapshotSpanCollection(fullSpan), CancellationToken.None);
tagger.GetAllTags(new NormalizedSnapshotSpanCollection(fullSpan), CancellationToken.None);
outliningManager.CollapseAll(fullSpan, c => c.Tag.IsImplementation);
outliningManager.CollapseAll(fullSpan, c => c.Tag.IsImplementation);
}
}
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册