Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-155

specify Instance<T>#destroy()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate Issue
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: Beans
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pmuir Pete Muir
                  Reporter:
                  struberg Mark Struberg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: