[Mono-bugs] [Bug 59459][Wis] New - Memory leaks in System.Data.OracleClient

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 2 Jun 2004 08:05:56 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by azabytin@mera.ru.

http://bugzilla.ximian.com/show_bug.cgi?id=59459

--- shadow/59459	2004-06-02 08:05:56.000000000 -0400
+++ shadow/59459.tmp.8832	2004-06-02 08:05:56.000000000 -0400
@@ -0,0 +1,73 @@
+Bug#: 59459
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: azabytin@mera.ru               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Memory leaks in System.Data.OracleClient
+
+Description of Problem:
+
+Memory is leaking then using OracleCommand. Just call ExecuteNonQuery() for 
+severate couple hundred times.
+
+CODE EXAMPLE:
+
+using System;
+using System.Data.OracleClient;
+using System.Threading;
+using System.Net;
+using System.Data;
+using System.Text;
+
+namespace TestProc
+{
+	class Class1
+	{
+		[STAThread]
+		static void Main(string[] args)
+		{
+
+				string connectionString = "user id=" + "user" + ";";
+				connectionString += "data source=" + "UPDB" + ";";
+				connectionString += "password=" + "pass";
+
+				OracleConnection  m_dbConnection = new OracleConnection( 
+connectionString );
+				m_dbConnection.Open();
+
+				OracleCommand command = new OracleCommand( );
+				command.Connection =  m_dbConnection;
+				command.CommandType	=CommandType.Text; 
+				command.CommandText =  "begin pkg_dev.authentic8();end;";
+				
+				for(;;)
+				{
+    					command.ExecuteNonQuery();
+				}
+				
+				command.Dispose();
+				m_dbConnection.Dispose();
+		}
+	}
+}
+
+Steps to reproduce the problem:
+1. Compile code using command line: mcs /t:exe  /r:System.Data /r:System.
+Data.OracleClient /out:TestProc.exe *.cs
+2. Run EXE
+3. Use Linux command "top" to see that memory is leaking
+
+
+How often does this happen? 
+Always