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: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 30 Jul 2003 23:25:51 -0700
Message-ID: <1a75df45.0307302225.56db524e@posting.google.com>


"Tilman Kuepper" <kuepper_at_xgraphic.de> wrote

> I have problems to connect to an Oracle server via MFC/ODBC.
> There seems to be a handle leak if I open/close the db
> connection from a worker thread. (Windows Task Manager shows
> that for every database connection two more handles are
> needed.)

I don't understand.. Task Manager can not detect or show leaks. It simply shows processes and threads.

If there are 10 threads running for process FOO.EXE and you are only expecting 2 threads, then:
- the threads takes longer to complete than what you estimated - the thread's terminating condition is not met (or met as expected)

> I have attached a small test program which shows this
> problem. <snipped>

Am not familiar at all with MFC, but how sure are you that the threads that you create do indeed terminate on cue?

As part of the test app, why not add an int i as a thread counter that is incremented and decremented by threads as they are created and destroy (making sure you lock the i++ amd i-- with critical section).

Dump i to stdout (or whatever) and use that to determine if threads run and complete as expected.

--
Billy
Received on Thu Jul 31 2003 - 01:25:51 CDT

Original text of this message

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