RFR: 8241837: Cleanup stringStream usage in ObjectSynchronizer
Claes Redestad
claes.redestad at oracle.com
Tue Mar 31 00:53:19 UTC 2020
On 2020-03-31 02:15, David Holmes wrote:
> There's a modification coming in via JEP-371 that allows as_string() to
> optionally return C-Heap copy of internal buffer - for when you need the
> string to live more permanently. That gives three usage patterns:
>
> - use base() when the string can be deleted by the stringStream destructor
> - use as_string(false) (default) when you need the string live longer
> than the stringStream, but within an enclosing ResourceMark scope.
> - use as_string(true) to get a "permanent" copy (that you have to free)
Interesting - doesn't sound very JEP-371-specific, but a welcome
improvement.
/Claes
More information about the hotspot-runtime-dev
mailing list