Memory Leak ?

Поиск
Список
Период
Сортировка
От zhaoxin
Тема Memory Leak ?
Дата
Msg-id 4487E76B.4000805@necas.nec.com.cn
обсуждение исходный текст
Ответы Re: Memory Leak ?  (Ludek Finstrle <luf@pzkagis.cz>)
Список 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




В списке pgsql-odbc по дате отправления:

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: DescribParam
Следующее
От: JGuillaume 'IoGuiX' de Rorthais
Дата:
Сообщение: Access97/odbcUnicode/pgsql : unable to map text field to memo type