Dependency Injection and IDisposable
The general rule of resources is that: He who owns the resource is responsible of disposing of it. This means that if a class owns a resource, it should either dispose of it in the same method that it created it in (in which case the disposable is called an ephemeral disposable), or if that’s … Read more