Author: lupus
Date: 2006-10-06 10:58:18 -0400 (Fri, 06 Oct 2006)
New Revision: 66356
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/gc.c
Log:
Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
* gc.c: do not allow the user to SuppressFinalize () a
delegate because it would leak the trampoline if present.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2006-10-06 14:42:05 UTC (rev 66355)
+++ trunk/mono/mono/metadata/ChangeLog 2006-10-06 14:58:18 UTC (rev 66356)
@@ -1,3 +1,9 @@
+
+Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
+
+ * gc.c: do not allow the user to SuppressFinalize () a
+ delegate because it would leak the trampoline if present.
+
2006-10-06 Zoltan Varga <[EMAIL PROTECTED]>
* class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add
support for the
Modified: trunk/mono/mono/metadata/gc.c
===================================================================
--- trunk/mono/mono/metadata/gc.c 2006-10-06 14:42:05 UTC (rev 66355)
+++ trunk/mono/mono/metadata/gc.c 2006-10-06 14:58:18 UTC (rev 66356)
@@ -282,6 +282,13 @@
{
MONO_ARCH_SAVE_REGS;
+ /* delegates have no finalizers, but we register them to deal with the
+ * unmanaged->managed trampoline. We don't let the user suppress it
+ * otherwise we'd leak it.
+ */
+ if (obj->vtable->klass->delegate)
+ return;
+
object_register_finalizer (obj, NULL);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches