Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-711

Calling Contextual.destroy on an instance still references an instance on BeanManager

    XMLWordPrintable

Details

    • Hide

      1) Use seam-faces module extension.
      2) Annotate a bean with @ViewScoped
      3) When destroy is called, check Yourkit.

      You will find that there are still references to the instance destroyed (not related to seam-faces).

      Show
      1) Use seam-faces module extension. 2) Annotate a bean with @ViewScoped 3) When destroy is called, check Yourkit. You will find that there are still references to the instance destroyed (not related to seam-faces).
    • Workaround Exists
    • Hide

      Avoid the use of new AnnotationLiteral<MyAnnotation>{} in your code. Instead make AnnotationLiterals either top level or static inner classes.

      Show
      Avoid the use of new AnnotationLiteral<MyAnnotation>{} in your code. Instead make AnnotationLiterals either top level or static inner classes.
    • High

    Description

      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);

      Attachments

        Activity

          People

            pmuiratbleepbleep Pete Muir (Inactive)
            rhn-support-ggastald George Gastaldi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: