
I implemented a diagnostic tagger class by inheriting CollectionTagger<ISquiggleTag> and IDisposable.
Then register it through syntaxEditor.Document.Language.RegisterService(tagger).
In the obtained service, I can see that my tagger is only registered once.
But when I unregister service, tagger.Dispose() will be called twice. Is this normal?
This is the code to unregister service:
It will be called more times in the actual project, I don’t quite understand what caused it.