memory leak! in Oracle ODBC on NT v. 1.13.5.0.0

From: Stephen Flanagan <mwc.sflanaga_at_capital.ge.com>
Date: 1996/08/09
Message-ID: <320B9870.6CFB_at_capital.ge.com>#1/1


Here is some ODBC code that allocates more and more memory when it should not. You can observe this by watching the process's memory usage grow using NT's perf. monitor (process / private bytes).

If there is something wrong with what I'm doing, let me know. Such a simple bug like this from Oracle surprises me.

Here is the code:
HENV Henv;
HDBC Hdbc;
HSTMT Hstmt;

char *pMachine="mwc4";
char *pLogin="sflanaga";
char *pPassword="tmott";

int retcode = SQLAllocEnv(&Henv);
retcode = SQLAllocConnect(Henv,&Hdbc);
retcode = SQLConnect(Hdbc, (UCHAR *)"mwc4", strlen((const char *)pMachine),

(UCHAR *)pLogin, strlen((const char *)pLogin),
(UCHAR *)pPassword, strlen((const char*)pPassword));

retcode = SQLAllocStmt(Hdbc, &Hstmt);
for ( int i=0; i<250; i++ )
{

	retcode=SQLExecDirect(Hstmt, 

(UCHAR *)"insert into test1(t) values ('lots of test data')",
SQL_NTS); Sleep(5000);

}   Received on Fri Aug 09 1996 - 00:00:00 CEST

Original text of this message