I'm using StructureMap in my project and when the application finishes running I need to call the Dispose() method on all of the instances inside the ObjectFactory that implement IDisposable.
I cannot find anyway to do it via the StructureMap API.
Another thought I had was to get a reference to every instance and call it myself, but I cannot figure out how to loop through all of the instances.