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

Use Cleaner instead of finalize to auto stop Timer thread

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • core-libs
    • b15

    Description

      Object.finalize has been deprecated and uses of finalize should be converted to use PhantomReferece, possibly via java.lang.ref.Cleaner.

      Each java.util.Timer has an associated thread. This thread needs to be signaled to self-terminate if the owning Timer object becomes unreachable. This is currently implemented via an internal supporting object with a finalize method.

      Attachments

        Issue Links

          Activity

            People

              kbarrett Kim Barrett
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: