Received: from cwcom.net (email.mcmail.com [195.44.0.152]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA83088 for ; Thu, 20 Apr 2000 11:23:02 -0400 (EDT) (envelope-from tim.brookes@mcmail.com) Received: from mcmail.com ([195.44.203.158]) by cwcom.net with Microsoft SMTPSVC(5.5.1877.387.38); Thu, 20 Apr 2000 16:22:59 +0100 Message-ID: <38FF2126.9525DB82@mcmail.com> Date: Thu, 20 Apr 2000 16:24:22 +0100 From: Tim Brookes X-Mailer: Mozilla 4.6 [en-gb] (Win98; I) X-Accept-Language: en-GB,en,en-* MIME-Version: 1.0 To: Tom Lane CC: pgsql-interfaces@postgresql.org Subject: Re: libpq++ memory problems References: <38FB6FA1.C63B030B@mcmail.com> <16483.956019092@sss.pgh.pa.us> <38FEB8DB.DBC3460E@mcmail.com> <2182.956243193@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200004/165 Tom I did not use configure - I downloaded a set of RPMs for 6.5.3 I then just changed the program not to require PgEnv and then compiled,linked with the libpq++ library. Maybe I should download the sources and compile on my system, but I dont see how that will change what I see as momory not being released in the PgDatabase destructor. Rgds Tim Tom Lane wrote: > Tim Brookes writes: > > So I have downloaded and set up version 6.5.3 on a test system. I then > > altered the code on the example so that it no longer uses the PgEnv class. > > I set my environment variable and ran the program now as below. I still get > > a huge memory leak. > > > Can I ask you what version you are using? > > Current CVS sources --- ie, 7.0RC1 plus or minus a little bit. But as > far as I can tell from the CVS logs, not much has been done to libpq++ > since 6.5; there's certainly nothing in the logs about fixing memory > leaks. So I'd have expected 6.5 to behave the same. Interesting. > > > callproc(){ > > PgDatabase* loStatsdb; > > > loStatsdb = new PgDatabase(""); > > delete loStatsdb; > > }; > > > main(){ > > while(1){ > > callproc(); > > }; > > }; > > AFAIR, my test program looked just like that except it specified a > database name --- new PgDatabase("dbname=regression") or some such. > > I wonder if it could be platform- or configuration-specific. What > options did you give to configure? > > regards, tom lane