PQnotifies and freeing memory. - Mailing list pgsql-general

From Joshua Moore-Oliva
Subject PQnotifies and freeing memory.
Date
Msg-id 200310110510.53507.josh@chatgris.com
Whole thread Raw
Responses Re: PQnotifies and freeing memory.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
After reading the below struct and free statement, I am rather confused..

Do I need to free the struct, the char *, or both?

Thanks.

PGnotify* PQnotifies(PGconn *conn);

 typedef struct pgNotify {
     char *relname;              /* name of relation containing data */
     int  be_pid;                /* process id of backend */
 } PGnotify;

 After processing a PGnotify object returned by PQnotifies, be sure to free it
with free() to avoid a memory leak.


pgsql-general by date:

Previous
From: "Claudio Lapidus"
Date:
Subject: "slicing" records
Next
From: Richard Huxton
Date:
Subject: Re: "slicing" records