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: 30 Jul 2003 20:02:22 GMT
Message-ID: <slrnbig936.1m4.do-not-spam-benh@tin.bwsint.com>


In article <bg8val$mbp08$1_at_ID-164439.news.uni-berlin.de>, Tilman Kuepper wrote:
> Hello Ben...
>

>> This isn't an Oracle problem.  AfxBeginThread() returns a pointer
>> to a CWinThread, which includes a handle to the thread.  You need
>> to delete this object when you are done with it (either before or
>> after the thread exits, depending on whether you need to know when
>> it is still running).

>
> Thank you for your answer. But I think this is not the solution to
> my problem. If I remove the db functions from MyThread()...
<snip>
> Then the handle leak is gone.

I see.

> (I didn't change anything else, e. g. deleting the CWinThread object
> etc.) That's why I think the problem might be database-related.

Possibly the connection can take more than the 2500 ms you wait for between creating different threads? Then with the database code in there you can get many threads running at a time, whereas without it you only have 1 or 2 threads.

How about using just one thread in the test program? Received on Wed Jul 30 2003 - 15:02:22 CDT

Original text of this message

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