From: | zhaoxin <zhaox(at)necas(dot)nec(dot)com(dot)cn> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Memory Leak ? |
Date: | 2006-06-08 09:01:31 |
Message-ID: | 4487E76B.4000805@necas.nec.com.cn |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi,
I have a C++ application for testing memory leak that connects to
PostgreSQL8.1.3 Database using psqlODBC 08.01.02.00 unicode driver.
I have found some memory leak with the windows performance tool.
I have tried to upgrade the psqlODBC to 08.02.0002 ,but the leak still
exists.
The piece of my Code is like this:
SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv);
SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
SQLConnect (hDBC, szDSN, SQL_NTS, szUID, SQL_NTS, szPasswd, SQL_NTS);
SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
while( i < 10){
SQLPrepare(hstmt,(SQLCHAR*)szSql, SQL_NTS);
SQLBindParameter(......);
......
SQLExecute(hstmt);
SQLFreeStmt(hstmt,SQL_RESET_PARAMS);
}
SQLEndTran(SQL_HANDLE_DBC,(SQLHDBC)hdbc, SQL_COMMIT);
SQLFreeStmt(hstmt, SQL_CLOSE);
SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
SQLDisconnect(hdbc);
SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
my Env: VC.net, windows2003 server, PostgreSQL8.1.3
some of you have faced similar issue for memory leak?
or I have made some misstake in Using the Odbc function?
If you could help me, that would be great!
thanks,
zhao
From | Date | Subject | |
---|---|---|---|
Next Message | ioguix | 2006-06-08 09:31:43 | Access97/odbcUnicode/pgsql : unable to map text field to memo type |
Previous Message | Hiroshi Inoue | 2006-06-07 23:22:22 | Re: DescribParam |