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: Tilman Kuepper <kuepper_at_xgraphic.de>
Date: Wed, 30 Jul 2003 19:29:08 +0200
Message-ID: <bg8val$mbp08$1@ID-164439.news.uni-berlin.de>


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()...

unsigned int MyThread(void*)
{

    std::cout << "Open... ";
/***

    CDatabase db;
    db.OpenEx("DSN=MyDSN;UID=tilli;PWD=tilli", 0);     db.Close();
***/

    std::cout << "Close...\n";

    return 0;
}

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

Any other ideas...?!
Tilman Received on Wed Jul 30 2003 - 12:29:08 CDT

Original text of this message

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