Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7424517A61 for ; Wed, 23 Sep 2015 20:17:16 +0000 (UTC) Received: (qmail 27653 invoked by uid 500); 23 Sep 2015 20:17:05 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 27502 invoked by uid 500); 23 Sep 2015 20:17:05 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 27316 invoked by uid 99); 23 Sep 2015 20:17:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2015 20:17:04 +0000 Date: Wed, 23 Sep 2015 20:17:04 +0000 (UTC) From: "Bernd Eckenfels (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (VFS-548) SoftRefReleaseThread might leak MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)