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

PeriodicTask should declare its destructor virtual

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 17
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • 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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            xliu Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: