Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 69366 invoked from network); 8 Jul 2006 01:39:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jul 2006 01:39:29 -0000 Received: (qmail 3121 invoked by uid 500); 8 Jul 2006 01:39:22 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 3084 invoked by uid 500); 8 Jul 2006 01:39:22 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 3073 invoked by uid 99); 8 Jul 2006 01:39:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2006 18:39:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [209.86.89.66] (HELO elasmtp-spurfowl.atl.sa.earthlink.net) (209.86.89.66) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2006 18:39:21 -0700 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=ix.netcom.com; b=XOdpmIivqBazG2XrlOG2mjEhimji3reNe/8CpsQkhjkWRVGqFH1+tLY1z1ofz9h6; h=Received:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [66.245.135.50] (helo=[192.168.1.119]) by elasmtp-spurfowl.atl.sa.earthlink.net with asmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1Fz1mf-0006q7-B3 for java-dev@lucene.apache.org; Fri, 07 Jul 2006 21:39:01 -0400 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <16299949.1152320430179.JavaMail.jira@brutus> References: <16299949.1152320430179.JavaMail.jira@brutus> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <09C43B08-3EEE-49F0-9A90-379483D5BF06@ix.netcom.com> Content-Transfer-Encoding: 7bit From: robert engels Subject: Re: [jira] Commented: (LUCENE-623) RAMDirectory.close() should have a comment about not releasing any resources Date: Fri, 7 Jul 2006 20:39:02 -0500 To: java-dev@lucene.apache.org X-Mailer: Apple Mail (2.752.2) X-ELNK-Trace: 33cbdd8ed9881ca8776432462e451d7bd15d05d9470ff71025bed31044827b9f5275a2834ebe22ca350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.245.135.50 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I don't think there is any leak at all. the problem was the caller was maintaining a reference to the reader after close was called (which prevents usage anyway), and wanted to free some of the underlying memory - kind of pointless, he should just release the ref to the IndexReader (since it is unusable anyway). The patch was not needed. On Jul 7, 2006, at 8:00 PM, Yonik Seeley (JIRA) wrote: > [ http://issues.apache.org/jira/browse/LUCENE-623? > page=comments#action_12419805 ] > > Yonik Seeley commented on LUCENE-623: > ------------------------------------- > > Just out of curiousity, does Lucene hold onto a RAMDirectory > instance somewhere after it has called close on it? If so, that > would have been the ideal place to fix it any kind of "leak". > > This patch, while not doing much harm, is not really "best > practice" in Java and the existing RAMDirectory close() was correct. > Am I missing something? > >> RAMDirectory.close() should have a comment about not releasing any >> resources >> --------------------------------------------------------------------- >> ------- >> >> Key: LUCENE-623 >> URL: http://issues.apache.org/jira/browse/LUCENE-623 >> Project: Lucene - Java >> Type: Improvement > >> Components: Store >> Versions: 1.9 >> Reporter: Heng Mei >> Assignee: Hoss Man >> Priority: Minor >> Attachments: ramdirectory.diff >> >> I wrongly assumed that calling RAMDirectory.close() would free up >> the memory occupied by the RAMDirectory. >> It might be helpful to add a javadoc comment that warns users that >> RAMDirectory.close() is a no-op, since it might be a common >> assumption that close() would release resources. > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the > administrators: > http://issues.apache.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org