ODAC v.5.80.0.42 TOraSession:Connect/Disconnect memory leak

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Tony49
Posts: 21
Joined: Mon 26 Jan 2009 17:10

ODAC v.5.80.0.42 TOraSession:Connect/Disconnect memory leak

Post by Tony49 » Mon 26 Jan 2009 17:26

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 27 Jan 2009 09:48

We could not reproduce the problem. Please specify the exact version of your Oracle client.

Tony49
Posts: 21
Joined: Mon 26 Jan 2009 17:10

Post by Tony49 » Tue 27 Jan 2009 10:24

My client is : Oracle8i Release 8.1.7.4.1.

Tony49
Posts: 21
Joined: Mon 26 Jan 2009 17:10

Post by Tony49 » Tue 27 Jan 2009 10:28

Oups sorry :

My client is : 8.1.7.0.0
My database id : 8.1.7.4.1

Tony49
Posts: 21
Joined: Mon 26 Jan 2009 17:10

Post by Tony49 » Tue 27 Jan 2009 10:47

I also try with :

client : 9.2.0.1.0
database : 10.2.0.1.0

The problem is the same.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 30 Jan 2009 13:06

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.

Tony49
Posts: 21
Joined: Mon 26 Jan 2009 17:10

Post by Tony49 » Fri 30 Jan 2009 13:21

I delete Torasession. Is it possible to send you my codes sources?

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 02 Feb 2009 12:11

Yes. Please send your sample to support*devart*com.

Tony49
Posts: 21
Joined: Mon 26 Jan 2009 17:10

Post by Tony49 » Fri 06 Feb 2009 14:16

Thank you for your response by mail.

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

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 06 Feb 2009 16:04

We will also test it and continue investigation.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 12 Feb 2009 13:51

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.

Tony49
Posts: 21
Joined: Mon 26 Jan 2009 17:10

Post by Tony49 » Mon 16 Feb 2009 16:30

Thank you for your reply.

Post Reply