Author: andreia
Date: 2007-04-24 14:47:24 -0400 (Tue, 24 Apr 2007)
New Revision: 76211
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
Log:
* MimeIcon.cs: remove using blocks so that image streams are
not disposed of. Fixes #80151
2007-04-24 Andreia Gaita <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-24 18:27:09 UTC (rev 76210)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-24 18:47:24 UTC (rev 76211)
@@ -1,3 +1,8 @@
+2007-04-24 Andreia Gaita <[EMAIL PROTECTED]>
+
+ * MimeIcon.cs: remove using blocks so that image streams are
+ not disposed of. Fixes #80151
+
2007-04-24 Jackson Harper <[EMAIL PROTECTED]>
* TextBoxBase.cs: Fixup the height of textboxes when the control
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
2007-04-24 18:27:09 UTC (rev 76210)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MimeIcon.cs
2007-04-24 18:47:24 UTC (rev 76211)
@@ -58,14 +58,14 @@
static internal Bitmap Get (string name)
{
- using (Stream stream =
assembly.GetManifestResourceStream (name)) {
- if (stream == null) {
- Console.WriteLine ("Failed to read
{0}", name);
- return null;
- }
+ Stream stream = assembly.GetManifestResourceStream
(name);
+
+ if (stream == null) {
+ Console.WriteLine ("Failed to read {0}", name);
+ return null;
+ }
- return new Bitmap (stream);
- }
+ return new Bitmap (stream);
}
}
@@ -502,8 +502,8 @@
g_object_unref (pixbuf);
Image image = null;
- using (MemoryStream s = new MemoryStream (result))
- image = Image.FromStream (s);
+ MemoryStream s = new MemoryStream (result);
+ image = Image.FromStream (s);
return image;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches