-
Enhancement
-
Resolution: Done
-
Minor
-
None
-
None
A specialized bean is ignored in BeanManagerImpl.addBean() but ContextualStore can hold a reference preventing the objects from being released by GC. Moreover, AbstractClassBean.cleanupAfterBoot() is not invoked for specialized beans (because they were ignored by BeanManagerImpl) and so the corresponding EnhancedAnnotatedType is also kept in memory. As a result, tens of KBs are occupied for each specializaed bean which could never be used in the application.