jspuij / RESTier

A turn-key library for building RESTful services
http://odata.github.io/RESTier
Other
2 stars 0 forks source link

Look at proper disposal patterns of all classes. #3

Open jspuij opened 5 years ago

jspuij commented 5 years ago

Disposal of classes and used objects seems to be a mess. Especially if we want to make the library DI friendly, we should properly document proposed lifetimes of all classes and implement IDisposable on classes that directly own references to unmanaged resources. Moreover we should not implement or call IDisposable on anything that can or will be managed by a DI container. IT's all about inversion of control, so disposal is a task of the container.