RFR: 8253763: ParallelObjectIterator should have virtual destructor
Lin Zang
lzang at openjdk.java.net
Tue Sep 29 08:28:01 UTC 2020
On Tue, 29 Sep 2020 07:20:40 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> 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.
>
> Marked as reviewed by stefank (Reviewer).
Nice catch! Thanks for help fixing it !
-------------
PR: https://git.openjdk.java.net/jdk/pull/395
More information about the hotspot-gc-dev
mailing list