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

instance of class that extends Thread not gc'd if start() not called

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      solaris_8, windows_98

      Description

      Customer has created a new class that will run in it's own Thread. He has done this by extending the Thread class instead of by implementing the runnable interface.
      Instances of this class are then used to handle client requests and the application determines whether to call the instances start() method which will have the connection handled in a seperate Thread or the instances run() method which will have the connection handled in the current Thread.
      Using the second method, the instance is never gc'd even when completely dereferenced by the code that called it. This is due to the fact that the Threading system has a reference to the instance held as an element of a ThreadGroup. This reference is not lost until the Thread is started and then stopped.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: