PQclear
Description
Releases the storage associated with PGresult. Any query result should be released by PQclear when it is no longer needed.
Prototype
void PQclear(PGresult* res);
Parameter
| Keyword | Description |
|---|---|
| res | Object pointer that contains the query result. |
Precautions
PGresult is not automatically released. That is, it does not disappear when a new query is committed or even if you close the connection. To delete it, you must call PQclear. Otherwise, memory leakage occurs.
Examples
For details, see Typical Application Development Examples.