RFR: 8331553: Windows JVM leaks Event and Thread handles when multiple threads are used [v2]
Thomas Stuefe
stuefe at openjdk.org
Thu Jun 20 06:01:12 UTC 2024
On Wed, 19 Jun 2024 14:53:27 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> yeah, it's the C++ construction where the constructor and the destructor have side effects. It increases the system timer resolution, unless `ForceTimeHighResolution` is set. `ForceTimeHighResolution`, contrary to its name and help text, forces [low timer resolution](https://bugs.openjdk.org/browse/JDK-6435126). Sigh.
>
> Oh. That's.... interesting. 😞
Of course pre-existing, but the typical pattern we use with RAII objects that may or may not do something is to give it a constructor argument, e.g. `bool activate`, that controls if it is activated. Allocating an RAII object with new/delete seems odd.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19778#discussion_r1647001238
More information about the hotspot-runtime-dev
mailing list