Skip to content

Ensure proper disposal of engine objects #673

@CharliePoole

Description

@CharliePoole

This issue deals with some internal refactoring we need in order to ensure that the engine itself and objects it creates are disposed correctly. We will use the following standards:

  1. Interfaces that will most likely be implemented in a way that requires disposal will inherit from IDisposable. This allows the interface to be used directly for disposal, without a cast. Any implementation that doesn't require disposal can simply implement an empty Dispose method. Initial candidates are ITestEngine, ITestRunner, ITestEngineRunner but others may arise as the work is done.

  2. ServiceManager needs to implement IDispoable and should dispose of any services which implement it.

  3. TestEngine disposal should dispose of the service manager (and services) but not runners. Runners, once handed out, become the responsibility of the caller and should be disposed of before the engine is disposed.

  4. In all cases, disposal should be done through the standard disposal pattern.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions