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

PeriodicTask should declare its destructor virtual

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      generic

      Description

      PeriodicTask has a pure virtual member function, therefore users of it must define their subclasses. it's error-prone to leave it destructor non-virtual.

      It violates Effective C++ item 7: Declare destructors virtual in polymorphic base classes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              xliu Xin Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: