Arlodotexe / strix-music

Combine any music sources into a single library. It's your music. Play it your way.
http://www.strixmusic.com
139 stars 4 forks source link

Remove IAsyncDisposable from all CoreModels except ICore #223

Closed Arlodotexe closed 2 years ago

Arlodotexe commented 2 years ago

Problem

Many core models are IAsyncDisposable, even in situations where it isn't needed (such as ICoreImage)

Solution

Only the root ICore instance needs to be disposable. This instance is passed to every other model spawned from ICore, meaning that just having IAsyncInit and IAsyncDisposable on ICore should cover all service setup and teardown scenarios that these models might need. The models themselves don't need to be disposable.

Remove IAsyncDisposable from all models except ICore.