* gc.c: do not allow the user to SuppressFinalize () a
delegate because it would leak the trampoline if present.
svn path=/trunk/mono/; revision=66356
+
+Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
+
+ * gc.c: do not allow the user to SuppressFinalize () a
+ delegate because it would leak the trampoline if present.
+
2006-10-06 Zoltan Varga <vargaz@gmail.com>
* class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
{
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);
}