RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers
mandy chung
mandy.chung at oracle.com
Fri Sep 29 20:34:52 UTC 2017
On 9/27/17 2:31 AM, Peter Levart wrote:
>
> Up to a point where 'this' is dereferenced to obtain the 'zsRef' value
> (line 261), the Deflater instance is reachable. But after that, even
> ensureOpen() may be inlined and 'this' is not needed any more. After
> that point, obtaining zsRef.address() and calling setDictionaly on the
> obtained address may be racing with Cleaner thread invoking
> ZStreamRef.run():
What about making the native setDictionary method as an instance method
(currently it's a static method) so that this object remains strongly
reachable until the method returns?
Mandy
More information about the core-libs-dev
mailing list