Received: from cwcom.net (email.mcmail.com [195.44.0.152]) by hub.org (8.9.3/8.9.3) with ESMTP id DAA46084 for ; Thu, 20 Apr 2000 03:57:57 -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 08:57:54 +0100 Message-ID: <38FEB8DB.DBC3460E@mcmail.com> Date: Thu, 20 Apr 2000 08:59:24 +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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200004/160 OK 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? callproc(){ PgDatabase* loStatsdb; loStatsdb = new PgDatabase(""); delete loStatsdb; }; main(){ while(1){ callproc(); }; }; Rgds Tim Brookes Tom Lane wrote: > Tim Brookes writes: > > The procedure 'callproc' is called in a continuous loop to emphasise > > this problem. Within the procedure all that happens is a new database > > connection is made and deleted. On my system this eats memory at an > > enormous rate. > > I could not reproduce such a leak with current sources. > > It appears that you are using a fairly old Postgres release --- class > PgEnv hasn't existed since at least release 6.4.*, maybe earlier. > I'd suggest upgrading... > > regards, tom lane