[Mono-bugs] [Bug 80786][Wis] Changed - [WIN] Saving Image to MemoryStream fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Feb 10 19:12:50 EST 2007


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 kornelpal at gmail.com.

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

--- shadow/80786	2007-02-10 18:18:45.000000000 -0500
+++ shadow/80786.tmp.1252	2007-02-10 19:12:50.000000000 -0500
@@ -12,13 +12,12 @@
 ReportedBy: levap at bansky.net               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
 Summary: [WIN] Saving Image to MemoryStream fails
-BugsThisDependsOn: 80515
 
 Description of Problem:
 Saving System.Drawing.Image into MemoryStream throws exception.
 
 
 Steps to reproduce the problem:
@@ -135,6 +134,21 @@
   execution under mono fine
   execution under MS.NET fine
 
 Hope this helps
 
 
+
+------- Additional Comments From kornelpal at gmail.com  2007-02-10 19:12 -------
+I just had a look at the code and I think I oversecured the objects 
+by using HandleRef.
+
+"this" is preserved because of Save method and encoderParams is not 
+required at all because unmanaged memory is release by Save.
+
+So it's safe to use IntPtr instead of HandleRef in 
+GdipSaveImageToStream.
+
+Please feel free to modify the declaration of GdipSaveImageToStream.
+
+(Note that this doesn't fix HandleRef but avoids using it 
+unnecessarily.)


More information about the mono-bugs mailing list