X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6B6709FA5BA for ; Thu, 8 Jun 2006 06:04:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 01703-05 for ; Thu, 8 Jun 2006 06:03:55 -0300 (ADT) X-Greylist: delayed 08:21:11.275226 by SQLgrey- Received: from new-mail.nec.com.cn (new-mail.nec.com.cn [211.100.22.21]) by postgresql.org (Postfix) with ESMTP id 2BC309FA3CD for ; Thu, 8 Jun 2006 06:03:53 -0300 (ADT) Received: from internal-mail.nec.com.cn ([172.28.88.254]) by new-mail.nec.com.cn with ESMTP id k5892TOm065552 for ; Thu, 8 Jun 2006 17:02:29 +0800 (CST) (envelope-from zhaox@necas.nec.com.cn) Received: from mailsv.necas.nec.com.cn (localhost.localdomain [127.0.0.1]) by internal-mail.nec.com.cn (Postfix) with ESMTP id 4E6F6178005 for ; Thu, 8 Jun 2006 17:16:24 +0800 (CST) Received: from [172.28.9.145] (zhoujy.necas.nec.com.cn [172.28.9.145]) by mailsv.necas.nec.com.cn (8.11.6/8.11.6) with ESMTP id k5892T807991 for ; Thu, 8 Jun 2006 17:02:29 +0800 Message-ID: <4487E76B.4000805@necas.nec.com.cn> Date: Thu, 08 Jun 2006 17:01:31 +0800 From: zhaoxin User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Memory Leak ? Content-Type: text/plain; charset=Shift_JIS Content-Transfer-Encoding: 7bit X-MAIL: new-mail.nec.com.cn k5892TOm065552 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/29 X-Sequence-Number: 7777 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