Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with handle leaks...?!

Re: Problem with handle leaks...?!

From: Ben Hutchings <do-not-spam-benh_at_bwsint.com>
Date: 31 Jul 2003 11:29:11 GMT
Message-ID: <slrnbihvcv.15g.do-not-spam-benh@tin.bwsint.com>


In article <bgaee6$mk4f7$1_at_ID-164439.news.uni-berlin.de>, Tilman Kuepper wrote:
<snip>

>> How about using just one thread in the test program?

>
> If using only one thread (i. e. not using AfxBeginThread) then the
> handle leak is gone. It seems that the problem only shows up, if the
> db connection is created by a worker thread. But I still hope that I
> don't have to open all my db connections in the main thread, because
> this would slow down the performance of the whole application...

Interesting. Then it sounds like something is creating per-thread handles and failing to delete them when the thread exits. (Any DLL can do this; Windows calls each loaded DLL's DllMain function whenever a thread exits.)

A Google Groups search for 'odbc "handle leak"' returns 67 results. It appears that quite a few ODBC drivers have had this kind of bug in some versions.

Are you using Oracle's or Microsoft's ODBC driver for Oracle? Do you have the latest version? It might be worth trying different drivers. Received on Thu Jul 31 2003 - 06:29:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US