[cdi-dev] [JBoss JIRA] Created: (CDI-155) specify Instance<T>#destroy()
Mark Struberg (JIRA)
jira-events at lists.jboss.org
Fri Sep 9 06:50:27 EDT 2011
specify Instance<T>#destroy()
-----------------------------
Key: CDI-155
URL: https://issues.jboss.org/browse/CDI-155
Project: CDI Specification Issues
Issue Type: Bug
Components: Beans
Affects Versions: 1.0
Reporter: Mark Struberg
Priority: Critical
Fix For: 1.1 (Proposed)
In CDI-14, Pete mentioned that
> We would need to extend Instance<> with a void destroy(T instance); method.
Ouch, very true. This is desperately needed for destroying @Dependent and other not-normalscoped beans which got created via Instance<T>#get().
This currently creates memory leaks because we have no way to dispose the CreationalContext<T> used for creating this very bean. And since the CreationalContext<T> also holds references to all Interceptors, Decorators and subsequently injected beans, those won't be released neither.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list