[weld-issues] [JBoss JIRA] Commented: (WELD-711) Calling Contextual.destroy on an instance still references an instance on BeanManager

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Mon Nov 15 15:00:43 EST 2010


    [ https://jira.jboss.org/browse/WELD-711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563456#comment-12563456 ] 

Stuart Douglas commented on WELD-711:
-------------------------------------

This issue is due to the use of AnnotationLiterals as anonymous inner classes. The annotations are cached as part of welds resolution process, but because they are non static inner classes they hold a reference to the outer class, which will never get released.

> Calling Contextual.destroy on an instance still references an instance on BeanManager
> -------------------------------------------------------------------------------------
>
>                 Key: WELD-711
>                 URL: https://jira.jboss.org/browse/WELD-711
>             Project: Weld
>          Issue Type: Bug
>          Components: Scopes & Contexts
>    Affects Versions: 1.0.1.Final, 1.1.0.Beta1
>            Reporter: George Gastaldi
>            Priority: Minor
>             Fix For: 1.1.0.CR1
>
>         Attachments: report.txt
>
>
> Using the seam-faces module @ViewScoped extension, when the object is destroyed by Contextual.destroy, weld still references an instance, avoiding being garbage-collected.
> Pseudo Code: 
> 	Contextual contextual = ...
> 	Object instance = ...
>         CreationalContext creational = ...
> 	contextual.destroy(instance, creational);

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list