Re: libpq++ memory problems - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: libpq++ memory problems
Date
Msg-id 2182.956243193@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq++ memory problems  (Tim Brookes <tim.brookes@mcmail.com>)
List pgsql-interfaces
Tim Brookes <tim.brookes@mcmail.com> 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


pgsql-interfaces by date:

Previous
From: "Ken J. Wright"
Date:
Subject: Re: Inserting NULL with pgaccess
Next
From: Tim Brookes
Date:
Subject: Re: libpq++ memory problems