ParallelObjectIterator should have virtual destructor

XMLWordPrintable

    • gc
    • b18

        The ParallelObjectIterator should have virtual destructor, since implementations of CollectedHeap::parallel_object_iterator() returns the base type, which is later passed to the delete operator.

        Today both G1 and Shenandoah leaks memory here. I noticed this bug when when implementing ZCollectedHeap::parallel_object_iterator(). Bug was introduced in JDK-8215624.

              Assignee:
              Per Liden (Inactive)
              Reporter:
              Per Liden (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: