-
Bug
-
Resolution: Done
-
Major
-
3.1.9.Final, 4.0.3.Final, 5.1.1.SP1
-
None
this bean-graph is composed of beans using the default scope that is the pseudo-scope dependent:
the programmatic creation of the root instance (bean-a), involves the creation of the entire bean-graph; likewise, its destruction involves the destruction of the entire bean-graph as the life cycle of each bean is established by its parent
however, it seems that the programmtic creation of a bean-graph which contains the annotations:
dependent, singleton and predestroy
cause a memory leak in java-se enviroment using weld-3.1.9.final
there are five checks available into the attached project:
a | PredestroyPojo | SUCCESS |
b | PojoWithSingletonPojo | SUCCESS |
c | PojoWithPojoWithSingletonPojo | SUCCESS |
d | PojoWithPredestroyPojo | FAILURE |
e | PojoWithPojowithPredestroyPojo | FAILURE |
the checks [d, e] have shown that the bean-graph does not come successfully destroyed, as some instances are bound to the singleton context (as parent dependent instances)
moreover, by creating multiple instance of the same bean, it emerges that the destruction of the bean-graph, for some classes, occurs on all instances except one