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

Use Cleaner instead of finalize to auto stop Timer thread

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: