[ 
https://issues.apache.org/jira/browse/VFS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14905174#comment-14905174
 ] 

Bernd Eckenfels commented on VFS-548:
-------------------------------------

another interpretation of this code

> SoftRefReleaseThread might leak 
> --------------------------------
>
>                 Key: VFS-548
>                 URL: https://issues.apache.org/jira/browse/VFS-548
>             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
(v6.3.4#6332)

Reply via email to