According to Spring documentation when a bean is scoped as \"prototype\" spring does not manage the complete lifecycle of its objects. More specifically the destruction life
The only clean way to terminate prototype-scoped bean is to explicitly call some of its "destroy"-methods to dispose resources.
You can also use Phantom References. Here is more info on different types of references.