This simple program just demonstrates that you can even redefine singletons in nested containers and they are destroyed when the nested container is disposed.
It just prints the HashCode of the instances twice -to ensure that they are defined as singletons-.
But this only works in StructureMap 2.6.x -actually because of a design flaw-, in 3.x branch throws a InvalidOperationException with the message:
Additional information: Only registrations of the default Transient, UniquePerRequest, and prebuilt objects are valid for nested containers. Remember that 'Transient' instances will be built once per nested container. If you need this functionality, try using a Child/Profile container instead
NestedContainerSingletons.Singleton or plugin type NestedContainerSingletons.ISingleton has lifecycle Singleton