vscode-runme
vscode-runme copied to clipboard
Adopt Disposable pattern
As is exemplified by #125, objects in the codebase (such as the Cell Providers) may want to register listeners or otherwise "own" disposables. We may want to start to adopt a disposable pattern across the codebase as more classes need to register disposables.
To avoid code duplication, one idea is to have base classes extend Microsoft's Disposable class class, which handles multiple disposal errors and being disposed multiple times. The drawback here is that these classes won't be able to then extend from anything else, though this could be solved by encapsulating an instance of the class rather than extending it.