[Mono-devel-list] BUG. Memory leaks in System.Data.OracleClient
Artem Zabytin
azabytin at mera.ru
Wed Jun 2 07:44:30 EDT 2004
Memory is leaking then using OracleCommand. Just call ExecuteNonQuery()
for a while
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();
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040602/3c7d5adc/attachment.html
More information about the Mono-devel-list
mailing list