[Mono-dev] Patch for SqlCommand

A Nagappan anagappan at novell.com
Fri Jun 8 06:38:31 EDT 2007


Hi,
  Could you please try the attached patch.

Thanks
Nagappan


Nagappan A <anagappan at novell.com>
Linux Desktop Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com

Novell, Inc.
SUSE* Linux Enterprise 10
Your Linux is ready*
http://www.novell.com/linux



>>> On Fri, Jun 8, 2007 at  8:31 AM, in message
<CBD431B4860DD747819D5274E5F1DE5D36E88C99E6 at server5.GEOTAB.local>, Neil
Cawse
<neilcawse at geotab.com> wrote: 
> I get the same (weird) segmentation fault I was getting before with
your 
> proposed changes. As an aside, not sure why I get a fault instead of
an 
> object disposed exception or something else.
> 
> This is the rough pseudo code as to what we are doing:
> IDataReader reader;
> try
> {
>         IDbCommand command = CreateCommand(connection);
>         try
>         {
>                 command.CommandText = "bla";
>                 command.Parameters = ..
>                 reader = command.ExecuteReader();
>         }
>         finally
>         {
>                 command.Parameters.Clear();
>                 command.Dispose();
>         }
>         // Segmentation Fault on the line below.
>         reader.Read();
> }
> finally
> {
>         reader.Dispose();
> }
> 
> Maybe the gc is not working 100% and is collecting something it
shouldn't?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dispose.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070608/e021f27c/attachment.pl 


More information about the Mono-devel-list mailing list