commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Eckenfels (JIRA)" <>
Subject [jira] [Commented] (VFS-548) SoftRefReleaseThread might leak
Date Wed, 23 Sep 2015 20:17:04 GMT


Bernd Eckenfels commented on VFS-548:

another interpretation of this code

> SoftRefReleaseThread might leak 
> --------------------------------
>                 Key: VFS-548
>                 URL:
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Bernd Eckenfels
>            Priority: Minor
>              Labels: leak, thread
> The lock-free but non-strict initiallisation of the SoftRefReleaseThread might in rare
condition construct but not start Thread objects. This is actually a leak in older java versions
(and I think causes a threadgroup to not be destroyed in newer versions). In any case, this
optimization is not needed as it is on a cold path, so using synchronized to set the new value
is perfectly fine. (especially as the thread constructor uses synchronized methods anyway).

This message was sent by Atlassian JIRA

View raw message