[Mono-bugs] [Bug 731579] New: Memory leak with DynamicMethod and --debug

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Nov 19 23:11:05 EST 2011



           Summary: Memory leak with DynamicMethod and --debug
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.10.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: JIT
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: zeno490 at gmail.com
         QAContact: mono-bugs at lists.ximian.com
                CC: lluis at novell.com, vargaz at gmail.com, gburt at suse.com
        Depends on: 605295
          Found By: ---
           Blocker: ---

+++ This bug was initially created as a clone of Bug #605295 +++

This bug is happening again on 2.10.6.
It causes the memory leak for bug #723148 I entered for GTK#.
The below test case indeed shows a memory leak in the identical situation: with
--debug it leaks, without it doesn't.

This test case makes memory grow quickly. It works fine if the instance
delegate (cls.Run) is replaced by a delegate to a static method.

using System;
using System.Runtime.InteropServices;

namespace DelegateTest
    class MainClass
        public static void Main (string[] args)
            MainClass cls = new MainClass ();
            while (true) {
                uint id = g_timeout_add (500, cls.Run, IntPtr.Zero);
                g_source_remove (id);

        bool Run ()
            return false;

        static extern void g_source_remove (uint id);

        static extern uint g_timeout_add (uint id, Func<bool> function, IntPtr

Configure bugmail: https://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