[Mono-bugs] [Bug 599686] New: Memory leak in Bitmap(JepgStream)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Apr 26 11:05:59 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=599686
http://bugzilla.novell.com/show_bug.cgi?id=599686#c0
Summary: Memory leak in Bitmap(JepgStream)
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: All
OS/Version: Linux
Status: NEW
Severity: Major
Priority: P5 - None
Component: Sys.Drawing.
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: christian.schmid at eps.ch
QAContact: mono-bugs at lists.ximian.com
Found By: Development
Blocker: ---
Description of Problem:
There is a memory leak when building a Bitmap from a jpeg stram
Steps to reproduce the problem:
Simple NUnit Test:
[Test]
public void TestB_JPegDecoding()
{
Bitmap pic = new Bitmap(640, 480,
System.Drawing.Imaging.PixelFormat.Format24bppRgb);
Stream stream= new MemoryStream();
pic.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
long startMemory = GC.GetTotalMemory(true);
for (int i = 0; i < 1000; ++i)
{
if (pic != null)
{
pic.Dispose();
}
stream.Seek(0, SeekOrigin.Begin);
pic = new Bitmap(stream);
}
long endMemory = GC.GetTotalMemory(true);
long picSize = 640 * 480 * 24;
Assert.Less(endMemory, startMemory + 2 * picSize);
}
Actual Results:
Bitmaps are not properly disposed! Memory allocation raises
Expected Results:
Memory allocation should be stable.
How often does this happen?
Always
Additional Information:
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list