Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6759706

Unclosed EventClients are never garbage-collected

XMLWordPrintable

      Creating an EventClient in the usual way implies creating two threads, a lease-renewal thread and a notification-fetching thread. If the EventClient object is subsequently discarded without having called its close method, it will never be garbage-collected and its two threads will continue to exist forever. This is because the threads have a strong reference to the EventClient. It would be better if they only referenced it weakly, and if they exited as soon as that weak reference was cleared.

            sjiang Shanliang Jiang (Inactive)
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: