libpq++ memory problems

From: Tim Brookes <tim(dot)brookes(at)mcmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq++ memory problems
Date: 2000-04-17 20:10:09
Message-ID: 38FB6FA1.C63B030B@mcmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Nelson Ferreira Junior 2000-04-17 21:30:32 Re: Large strings
Previous Message Nelson Ferreira Junior 2000-04-17 20:09:53 Large strings