Article View: borland.public.interbase.interclient
Article #57Re: Interbase memory leak
From: greg_ss4
Date: Thu, 08 Jul 2004 12:58
Date: Thu, 08 Jul 2004 12:58
70 lines
3060 bytes
3060 bytes
Curious if a solution has been found for this issue.
We are using Interbase 7.1 and when running drivers through
Rational Purify we also observe
interbase.interclient.lscStmtHandle objects that are not being
garbage collected.
Shaunak Mistry <no@no.com> wrote:
>David,
>
>I do have a good idea what this is about, It seems to me that the
>XSQLVARs are not getting GCed. Seems like some where we are hanging on
>to the older XSQLVARs.
>
>Let me look into it and will let you know what I find.
>
>Shaunak Mistry
>InterBase R&D,
>Borland Software Corporation.
>
>David Meng wrote:
>
>> Hi,
>>
>> I am using interbase 7, I have a Java client retriving data from interbase
>> using JDBC connection pool, however I got memory leak problem. When tracing
>> the problem in Optimizeit, it pointed to:
>> interbase.interclient.lscStmtHandle which hold a lot of references to
>> java.util.ArrayList object that can't be garbage collected. Does anyone have
>> any idea about this problem, thanks for your help.
>>
>> Here is the sample code I used:
>>
>> Statement stmt = null;
>> ResultSet rst = null;
>> Connection conn = null;
>>
>> try {
>> conn = connectionPool.getConnection();
>> stmt = conn.createStatement();
>> rst = stmt.executeQuery(sql);
>> if (rst.next())
>> {
>> result = rst.getString(columnName);
>> }
>> }
>> catch (SQLException e) {
>> e.printStackTrace();
>> throw e;
>> }
>> finally {
>> if (rst != null) {
>> try {rst.close();}catch(Exception e) {}
>> rst = null;
>> }
>> if (stmt != null) {
>> try {stmt.close();}catch(Exception e) {}
>> stmt = null;
>> }
>> if (conn != null) {
>> connectionPool.freeConnection(conn);
>> }
>> }
>>
>> Regards,
>> David Meng
>>
>>
>
Technical Details
Message-ID:
<40ed450e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fe0937d$1@newsgroups.borland.com> <40492F9E.2000308@no.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f54da,539bcfc83faa12d6,start X-Google-Attributes: gidf54da,public X-Google-Language: ENGLISH,ASCII-7-bit From: "greg_ss4" <null@devnull.com> Sender: "greg_ss4" <null@devnull.com> Reply-To: "greg_ss4" <null@devnull.com> Subject: Re: Interbase memory leak Newsgroups: borland.public.interbase.interclient X-User-Info: 192.35.35.34 References: <3fe0937d$1@newsgroups.borland.com> <40492F9E.2000308@no.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40ed450e@newsgroups.borland.com> Date: 8 Jul 2004 05:58:54 -0700 X-Trace: newsgroups.borland.com 1089291534 207.105.83.66 (8 Jul 2004 05:58:54 -0700) Lines: 71 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail