In "Pro Spring 2.5" it is said that
Spring doesn’t manage the life cycles of beans that are configured as nonsingletons.
So how do we manage the life cycle of non-singleton beans?
In "Pro Spring 2.5" it is said that
Spring doesn’t manage the life cycles of beans that are configured as nonsingletons.
So how do we manage the life cycle of non-singleton beans?
Check the spring reference, it says
The client code must clean up prototype-scoped objects and release expensive resources that the prototype bean(s) are holding. To get the Spring container to
release resources held by prototype-scoped beans, try using a custom bean post-processor, which holds a reference to beans that need to be cleaned up.