Skip to content
Peter edited this page Jun 22, 2016 · 2 revisions

Implement IDisposable on your kernel-bound singletons, to add cleanup logic for your classes. Dispose() will be called automatically on Wurm Assistant being closed.

Kernel smartly handles the order of disposing all it's singleton, so you are (mostly) safe to call any other API's within Dispose. Mostly, because Kernel allows many advanced (and rarely recommended) ways of dependency injection. However if sticking to constructor injection, you should be fine.

Clone this wiki locally