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

PeriodicTask should declare its destructor virtual

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 18
    • hotspot
    • b08
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: