[Mono-bugs] [Bug 81832][Nor] New - Passing a delegate to an unmanaged function seems to leak memory

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jun 8 07:57:52 EDT 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 bzximian.3.crazycomputers at neverbox.com.


--- shadow/81832	2007-06-08 07:57:52.000000000 -0400
+++ shadow/81832.tmp.27239	2007-06-08 07:57:52.000000000 -0400
@@ -0,0 +1,39 @@
+Bug#: 81832
+Product: Mono: Runtime
+Version: unspecified
+OS Details: Debian Lenny
+Status: NEW   
+Priority: Normal
+Component: interop
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: bzximian.3.crazycomputers at neverbox.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Passing a delegate to an unmanaged function seems to leak memory
+Steps to reproduce the problem:
+1. Run the attached testcase.
+2. Run `top` and sort by mem%.
+3. Watch mono/cli crawl to the top of the list.
+Actual Results:
+Mono starts allocating more and more memory.  The call to GC.Collect() does
+not seem to impact this at all.
+Expected Results:
+Mono should not allocating memory this fast.  I would expect it to cease at
+some point.  I would expect the usage to fluctuate as the idle handler is
+added to and removed from the list that glib maintains, but not enough to
+be seen on top, and certainly not to this extent.
+How often does this happen? 
+All the time.
+Additional Information:
+Maybe the way mono marshals delegates to function pointers is leaking

More information about the mono-bugs mailing list