Conversation
|
|
||
| const editorElement = atom.views.getView(editor) | ||
| const matchManager = new MatchManager(editor, editorElement) | ||
| /* eslint-disable no-new */ |
There was a problem hiding this comment.
Is there a reason we don't care about those objects? Shouldn't they be tracked?
From what I'm seeing both of those create subscriptions so they will stick around until Atom closes if we aren't tracking them.
There was a problem hiding this comment.
Doesn't seem like it, as we do track them within the classes and dispose them when each editor is closed. We should, however, also delete them when bracket-matcher is deactivated.
I think that might be outside of the scope of this pull request. What I can do is fix that first in a separate PR and then merge this one.
There was a problem hiding this comment.
I was going to make a PR a while ago to cleanly deactivate, but didn't want to get into the WeakSet stuff. It wasn't until recently I realised we could just iterate all current editors instead of trying to track what's in a WeakSet (I didn't want to convert to a normal set because I didn't know why a weak one was used in the first place).
There was a problem hiding this comment.
Hmm, I could take a stab at it and see how much progress I can make :).
👕👕👕