TadoQuery memory leak

xiaoxiao2021-03-06  39

I created a database connection in the thread, then cycled, using TadoQuery, a memory leak (Database Oracle 9.0.1) Ansistring strconnetStringc = "proviker = oraoledb.oracle.1; password =" p_strdbpassword " ; User ID = " p_strDbUser "; Data Source = " p_strDbName; TADOConnection * pADOConn = NULL; pADOConn = new TADOConnection (NULL); pADOConn-> ConnectionString = strConnetStringc; pADOConn-> Connected = false; pADOConn-> LoginPrompt = False; padoconn-> connected = true; ... while (...) {tadoquery * adoQuery = new tadoQuery (null); adoquery-> connection = padoconn; adoQuery-> sql-> clear (); adoQuery -> SQL-> add (strsql); adoquery-> open (); adoQuery-> close (); delete adoquery; adoquery = null;} AdoQuery has a memory leak, I don't know why? It was plagued for several days, depressed After a day of hard work, the problem solves :) I even is Oracle 9.0.1, the driver used by ADO is Oracle Provider for Ole DB provided by Oracle, so this problem occurs. I have been changed to Microsoft Ole DB Provider for Oracle, and the memory is no longer leaking.

转载请注明原文地址:https://www.9cbs.com/read-60622.html

New Post(0)