fix typo in link
[mdref/mdref-pq] / pq / Statement / deallocate.md
1 # void pq\Statement::deallocate()
2
3 Free the server resources used by the prepared statement, so it can no longer be executed.
4 This is done implicitly when the object is destroyed.
5
6 ## Params:
7
8 None.
9
10 ## Throws:
11
12 * pq\Exception\InvalidArgumentException
13 * pq\Exception\BadMethodCallException
14 * pq\Exception\RuntimeException
15
16 ## Example:
17
18 <?php
19
20 $connection = new pq\Connection;
21 $types = new pq\Types($connection);
22 $statement = $connection->prepare("st1",
23 "SELECT \$1, \$2", [pq\Types::XML, pq\Types::JSON]);
24
25 // some code which executes the statement
26
27 $statement->deallocate();
28
29 ?>
30