Subject memory leaks?
Author alesjelovsek
> Hello!
>
> We have experiance some problems using InterClient. IT seems like
> connections to
> database are not closed or at least some of them are not closed so
computer
> runs out
> of memory because of that.
> We are using Tomcat Version 4.0.4.
> Attached see java code for creating and closing connection.
>
> Here are some other code snippets:
>
> DBConnection connection = new DBConnection();
> Connection con = connection.getConnection();
> String strQuery = "SELECT * FROM
P_GetPostajalisceNaziv("+strPostajalisceID+")";
>
> PreparedStatement pst = con.prepareStatement(strQuery);
> ResultSet rs = pst.executeQuery();
> if (rs.next()) {
> postajalisce = rs.getString("oNazivDelovni");
> }
>
> rs.close();
> pst.close();
>
> if (connection != null) connection.freeConnection();
>
> I hope someone can give us some poitners what could be wrong with
our code
> or some other solution.
>
> TIA and best regards,
>
> Matjaz