StructureMap packaging container

In my application, each tenant has its own StructureMap container.

At run time, tenant instances can be disconnected or restarted. Is there any cleaning that I have to do (e.g. calling IContainer.Dispose), or should I just allow garbage collection to do the job?

We have several singleton instances that implement IDisposable. Ideally, we should call Dispose on them before disposing of the container. I know this is done automatically in a nested container, but not sure about the standard container?

Thanks,

Ben

+2
source share
2 answers

You must call Dispose in your container, which will have cached instances for you.

+5

.

" ". . , , :

0

All Articles