pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Brookes <tim.brookes@mcmail.com>
Cc: Lamar Owen <lamar.owen@wgcr.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq++ tracing considered harmful (was Re: libpq++ memory problems)
Date: Tue, 16 May 2000 11:11:40 -0400
Message-ID: <18276.958489900@sss.pgh.pa.us> (raw)
In-Reply-To: <39215D67.6CAA6AD0@mcmail.com>
References: <38FB6FA1.C63B030B@mcmail.com>
	<16483.956019092@sss.pgh.pa.us>
	<38FEB8DB.DBC3460E@mcmail.com>
	<2182.956243193@sss.pgh.pa.us>
	<38FF2126.9525DB82@mcmail.com>
	<38FF243E.E5C0E87E@wgcr.org>
	<8163.956252492@sss.pgh.pa.us>
	<38FF471B.4463ECF2@wgcr.org>
	<8280.956254952@sss.pgh.pa.us>
	<38FF4C3F.D79FCF4D@wgcr.org>
	<8424.956255864@sss.pgh.pa.us>
	<392117E9.D8118E6C@mcmail.com>
	<10624.958485880@sss.pgh.pa.us>
	<39215D67.6CAA6AD0@mcmail.com>

Tim Brookes <tim.brookes@mcmail.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()



view thread (6+ messages)

Message-ID: <18276.958489900@sss.pgh.pa.us>
Permalink:  ../18276.958489900@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18276.958489900@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tim.brookes@mcmail.com, lamar.owen@wgcr.org
  Subject: Re: libpq++ tracing considered harmful (was Re: libpq++ memory problems)
  In-Reply-To: <18276.958489900@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox