Re: libpq++ tracing considered harmful (was Re: libpq++ memory problems)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Brookes <tim(dot)brookes(at)mcmail(dot)com>
Cc: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq++ tracing considered harmful (was Re: libpq++ memory problems)
Date: 2000-05-16 15:11:40
Message-ID: 18276.958489900@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Tim Brookes <tim(dot)brookes(at)mcmail(dot)com> writes:
> The code is simply a constructor and destructor call of PgDatabase,
> called in succession, within an endless loop to emphasise the issue.
> But you're right, something isn't being released - within the
> destructor.

All I can say is, I see absolutely zero leakage with 7.0 code and the
attached test program. Are you sure you didn't link a 6.5 library
by mistake, or something like that?

regards, tom lane

#include <iostream.h>
#include <libpq++.h>

int main()
{
for (int i = 0; i < 10000; i++) {
// Open the connection to the database and make sure it's OK
PgDatabase data("dbname=template1 user=postgres");
if ( data.ConnectionBad() ) {
cout << "Connection was unsuccessful..." << endl
<< "Error message returned: " << data.ErrorMessage() << endl;
return 1;
}
}
return 0;
} // End main()

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Steve Wampler 2000-05-16 18:19:34 Detecting presence of database through JDBC?
Previous Message Tom Lane 2000-05-16 14:04:40 Re: libpq++ tracing considered harmful (was Re: libpq++ memory problems)