* Miguel de Icaza (miguel@ximian.com)
* Patrik Torstensson (patrik.torstensson@labs2.com)
*
- * (C) 2001 Ximian, Inc.
- * Copyright (C) 2002-2006 Novell, Inc.
+ * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
+ * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
*
* This file is used by the interpreter and the JIT engine to locate
* assemblies. Used to load AssemblyRef and later to resolve various
#include <mono/metadata/profiler.h>
#include <mono/metadata/profiler-private.h>
#include <mono/metadata/exception.h>
+#include <mono/metadata/marshal.h>
#include <mono/utils/mono-logger.h>
#include <mono/utils/mono-dl.h>
#include <mono/utils/mono-membar.h>
/*
* This lock protects the hash tables inside MonoImage used by the metadata
* loading functions in class.c and loader.c.
+ *
+ * See domain-internals.h for locking policy in combination with the
+ * domain lock.
*/
static CRITICAL_SECTION loader_mutex;
MonoMethodWrapper *mw = (MonoMethodWrapper*)method;
int i;
+ mono_marshal_free_dynamic_wrappers (method);
+
mono_loader_lock ();
mono_property_hash_remove_object (method->klass->image->property_hash, method);
mono_loader_unlock ();