Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with handle leaks...?!
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