From: <br...@us...> - 2004-02-28 19:44:20
|
Update of /cvsroot/htoolkit/HSQL/src/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10379 Modified Files: ODBC.hsc Log Message: Fixed a statement handle leak. This would cause programs to leak about 10k / statement. Earlier, SQLFreeStmt was called with Option = SQL_CLOSE (0) which just closes the cursor and discards the results, but doesn't free the statement. Now SQLFreeStmt is called with Option = (SQL_DROP) (1), which frees the statement. Index: ODBC.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/src/HSQL/ODBC.hsc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ODBC.hsc 24 Feb 2004 08:45:20 -0000 1.8 --- ODBC.hsc 28 Feb 2004 19:26:46 -0000 1.9 *************** *** 199,203 **** free pQuery handleResult res ! sqlFreeStmt hSTMT 0 >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT free pFIELD --- 199,203 ---- free pQuery handleResult res ! sqlFreeStmt hSTMT (#const SQL_DROP) >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT free pFIELD *************** *** 378,380 **** closeStatement hSTMT buffer = do free buffer ! sqlFreeStmt hSTMT 0 >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT --- 378,380 ---- closeStatement hSTMT buffer = do free buffer ! sqlFreeStmt hSTMT (#const SQL_DROP) >>= handleSqlResult (#const SQL_HANDLE_STMT) hSTMT |