Leaky ODBC
From: NoSpam <NoSpam_at_NoSpam.com>
Date: Tue, 7 Aug 2001 14:22:09 -0400
Message-ID: <9kp7oo$8pg$1_at_ih292.ea.unisys.com>
Date: Tue, 7 Aug 2001 14:22:09 -0400
Message-ID: <9kp7oo$8pg$1_at_ih292.ea.unisys.com>
Hi,
I was testing a few ODBC drivers on W2K for memory leaks. What I did was this:
- SQLAllocEnv, SQLAllocConnect, SQLConnect, SQLAllocStmt
- Loop 1000 times SQLExecDirect("select 1 from a small_table") // about 100 rows while SQLFetch SQLGetData SQLFreeStmt(SQL_CLOSE)
- SQLFreeStmt(SQL_DROP), SQLDisconnect, SQLFreeConnect, SQLFreeEnv.
I stop the process just before 1) and just after 3) for me to look at NT's Task Manager for the process memories allocated. The difference between the two is consistently 8MB for Oracle and 200K for MsSql and a bit less for MsAccess. I heard ODBC do lose memory but this is way too much. Have I done something wrong? Is the process memory shown in Task Manager trust worthy?
TIA Received on Tue Aug 07 2001 - 20:22:09 CEST