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

(thread) Thread target instance variable should be nulled when thread is stopped

XMLWordPrintable

    • x86
    • windows_95



      Name: dgC58589 Date: 12/10/97


      Sometimes threads seem not to be deleted from thread groups when they
      are killed. This is a problem in itself that I don't yet understand.
      But, those threads have definitely died, they are not running, etc. But
      they can cause applets and applications to hang around because they still
      reference a "target", which was loaded by a classloader. This means that
      the applet or application can never have its classes garbage collected,
      because of that one reference to an instance that was loaded by that
      clcassloader.

      So, a work-around for the fact that threads are sometimes not deleted from
      their thread-group when they are stopped is to simply null out the target
      instance variable when the thread is stopped.

      Actually, I just realized that this would make it impossible to stop a thread
      with a target and then restart it. Do people do that?

      Damn!
      (Review ID: 21671)
      ======================================================================

            psoper Pete Soper (Inactive)
            dgrahamcsunw David Graham-cumming (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: