libpq++ memory problems - Mailing list pgsql-interfaces

From Tim Brookes
Subject libpq++ memory problems
Date
Msg-id 38FB6FA1.C63B030B@mcmail.com
Whole thread Raw
Responses Re: libpq++ memory problems  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
I have written the following small piece of code to illustrate my
problem.

#include <pgsql/libpq++.h>

void callproc(){  PgDatabase* loStatsdb;  PgEnv loEnv("","","","","");
  loStatsdb = new PgDatabase(loEnv,"ftldb");  delete loStatsdb;
};

main(){  while(1){     callproc();  };
};

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 do not know if this problem has been discussed before or fixed in
newer versions of the library (my apologies if it has), but I would be
most grateful of any info on resolving this memory leak.

Tim Brookes



pgsql-interfaces by date:

Previous
From: Nelson Ferreira Junior
Date:
Subject: Large strings
Next
From: Nelson Ferreira Junior
Date:
Subject: Re: Large strings