Page 1 of 1

ODAC v.5.80.0.42 TOraSession:Connect/Disconnect memory leak

Posted: Mon 26 Jan 2009 17:26
by Tony49
Hi,

TOraSession Connect/Disconnect causes memory leak.
In task manager the handles increasing again and again.

I've tested it with ODAC v.5.80.0.42 and Borland C++ builder 5.

Loop :

TOraSession* pSession = NULL;
pSession = new TOraSession(NULL);
pSession->AutoCommit = false;
pSession->ConnectPrompt = false;
pSession->Server = "mydatabase";
pSession->Username = "myusername"
pSession->Password = "mypassword";
pSession->Connect();
pSession->Disconnect();
delete pSession;


P.S. Sorry for my bad English.

Is there a patch for this problem?

Thanks for your help.

Posted: Tue 27 Jan 2009 09:48
by Plash
We could not reproduce the problem. Please specify the exact version of your Oracle client.

Posted: Tue 27 Jan 2009 10:24
by Tony49
My client is : Oracle8i Release 8.1.7.4.1.

Posted: Tue 27 Jan 2009 10:28
by Tony49
Oups sorry :

My client is : 8.1.7.0.0
My database id : 8.1.7.4.1

Posted: Tue 27 Jan 2009 10:47
by Tony49
I also try with :

client : 9.2.0.1.0
database : 10.2.0.1.0

The problem is the same.

Posted: Fri 30 Jan 2009 13:06
by Plash
Make sure that you delete TOraSession object in the loop. I can reproduce the problem when TOraSession objects are not deleted. When objects are deleted, handle count does not increase.

Posted: Fri 30 Jan 2009 13:21
by Tony49
I delete Torasession. Is it possible to send you my codes sources?

Posted: Mon 02 Feb 2009 12:11
by Challenger
Yes. Please send your sample to support*devart*com.

Posted: Fri 06 Feb 2009 14:16
by Tony49
Thank you for your response by mail.

I tried with OCI_LIB (opensource project) and i have no problem. Handles not increase.

Posted: Fri 06 Feb 2009 16:04
by Challenger
We will also test it and continue investigation.

Posted: Thu 12 Feb 2009 13:51
by Plash
This problem occurs because of a bug in the Oracle client.
We can reproduce the problem with the client 9.2.0.1. To fix the problem add the OraCall unit to 'uses', and add the following code to the initialization section of your unit:

Code: Select all

initialization
  OCIThreaded := False;
This disables support for multi-threaded appication in OCI. In this case handles do not leak. You can use this mode if you don't work with Oracle from several threads.

We cannot reproduce the problem with Oracle client 10.2.0.1. In this client handles do not leak with any value of the OCIThreaded variable. So you can upgrade your Oracle client to fix the problem.

Posted: Mon 16 Feb 2009 16:30
by Tony49
Thank you for your reply.