[Mono-bugs] [Bug 590493] New: Memory Leak in System.Drawing.Image.Save when saving to a Stream on Mono-2.6.3

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 23 10:10:48 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=590493

http://bugzilla.novell.com/show_bug.cgi?id=590493#c0


           Summary: Memory Leak in System.Drawing.Image.Save when saving
                    to a Stream on Mono-2.6.3
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: i386
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: libgdiplus
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jim at apption.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=350045)
 --> (http://bugzilla.novell.com/attachment.cgi?id=350045)
Program that continually loads a .jpg image and converts it to a .png memory
stream

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1036 Safari/532.5

Some memory is not being garbage collected when the Image.Save() method is
call.  This problem occurs only when Image.Save is passed a Stream (tested with
MemoryStream and FileStream) and does not occur when Image.Save is passed a
string for the file path.

Reproducible: Always

Steps to Reproduce:
1. Compile attached program 
2. Put a picture called picture.jpg in the same directory as the program will
be executed.  (Picture should be 10k or more)
3. Run the program.
4. Watch the amount of memory used by the program continue to increase
Actual Results:  
The program continues to use more and more memory until it starts paging. (If
two or more of these programs are running concurrently it eventually crashes
the program)

Expected Results:  
On both .net and an earlier version of Mono the program continues to run using
less than 1Mbytes of memory (depends on image size)

-- 
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