RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v2]

Jorn Vernee jvernee at openjdk.org
Wed Nov 1 16:46:03 UTC 2023


On Wed, 1 Nov 2023 16:37:59 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Ah, ok I see. Thanks for the link.
>
> This is a case where using rvalues and perfect forwarding is incorrect. The
> arguments are potentially used in multiple E constructor calls. Using the same
> rvalue in multiple places is very bad.

Ah, that's right. We call it in a loop, so `args...` might be used multiple times.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1379045975


More information about the hotspot-dev mailing list