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

specify Instance<T>#destroy()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Critical
    • None
    • 1.0
    • Beans
    • 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.

      Attachments

        Issue Links

          Activity

            People

              pmuiratbleepbleep Pete Muir (Inactive)
              struberg Mark Struberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: