Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id IAA27100 for postgres-dist; Fri, 10 Dec 1993 08:55:26 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199312101655.IAA27100@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from mail.cs.tu-berlin.de (root@mail.cs.tu-berlin.de [130.149.17.13]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id IAA27082 for <postgres@postgres.berkeley.edu>; Fri, 10 Dec 1993 08:50:22 -0800
Received: from owl.cs.tu-berlin.de ([130.149.48.251]) by mail.cs.tu-berlin.de with SMTP id AA02825
  (5.65c8/IDA-1.4.4(mail.m4[1.12]) for <postgres@postgres.berkeley.edu>); Fri, 10 Dec 1993 17:46:28 +0100
From: Olaf Gerloff <gerloff@cs.tu-berlin.de>
Message-Id: <199312101646.AA02825@mail.cs.tu-berlin.de>
Subject: Avoiding memory leaks
To: postgres@postgres.Berkeley.EDU
Date: Fri, 10 Dec 1993 17:46:26 +0100 (MET)
X-Mailer: ELM [version 2.4 PL21]
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Length: 1159      
Resent-To: postgres-dist@postgres.Berkeley.EDU
Resent-Date: Fri, 10 Dec 93 08:55:26 -0800
Resent-XMts: smtp

Hello Gurus,
I have two questions about avoiding memory leaks in a libpq based application:

1. Must I free the storage claimed by a portal with PQclear, or is this done
   implicit, if I send the Postquel 'close' command to the backend?
2. Is the storage, which contains the result of PQgetvalue, allocated by
   malloc? Will it be overwritten by another call of PQgetvalue? So, must
   I copy the returned attribut-value, or can I store the returned pointer in
   my application?

Thanks for your help!

Greetings, Olaf
-- 
******************************************************************************
* Olaf Gerloff                     *    Impossible things will be executed   *
* Technical University Berlin (FRG)*    immediately, miracles take a little  *
* Department of Computer Science   *                 longer!                 * 
* Computerbased Informationsystems *                                         *
******************************************************************************
* Internet: gerloff@cs.tu-berlin.de    or   BITNET: GERLOFF@DB0TUI11         *
******************************************************************************
