Skip site navigation (1) Skip section navigation (2)

Re: libpq & freeing character results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Robert A(dot) Knop Jr(dot)" <rknop(at)lilys(dot)lbl(dot)gov>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq & freeing character results
Date: 2000-06-27 21:36:57
Message-ID: 14360.962141817@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
"Robert A. Knop Jr." <rknop(at)lilys(dot)lbl(dot)gov> writes:
> If one uses libpq functions such as PQfname, should one free the returned
> character string?

No.  Unless the doc for the function explicitly says you should free
its result, it's a pointer into libpq-managed space.

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: JT MacNeilDate: 2000-06-27 22:18:28
Subject: ODBC and Visual C++
Previous:From: tomasDate: 2000-06-27 20:20:49
Subject: Re: libpq & freeing character results

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group