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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-interfaces by date

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