blob: 85fd5a5b85e20bec92cbd0d9839ede7b9a4f531c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package org.postgresql;
import java.sql.Statement;
import java.sql.SQLException;
public abstract class PGStatement implements Statement {
public ObjectPool inusemap_dim1[];
public ObjectPool inusemap_dim2[];
protected Connection connection;
public PGStatement(Connection connection){
this.connection = connection;
inusemap_dim1 = connection.pg_stream.factory_dim1.getObjectPoolArr();
inusemap_dim2 = connection.pg_stream.factory_dim2.getObjectPoolArr();
}
public void deallocate(){
connection.pg_stream.deallocate(this);
}
public void close() throws SQLException {
deallocate();
connection.pg_stream.factory_dim1.releaseObjectPoolArr(inusemap_dim1);
connection.pg_stream.factory_dim2.releaseObjectPoolArr(inusemap_dim2);
}
}
|