diff options
-rw-r--r-- | src/vm/dllimportcallback.cpp | 7 | ||||
-rw-r--r-- | src/vm/dllimportcallback.h | 16 |
2 files changed, 7 insertions, 16 deletions
diff --git a/src/vm/dllimportcallback.cpp b/src/vm/dllimportcallback.cpp index b5a4c9c4d7..8c4970970b 100644 --- a/src/vm/dllimportcallback.cpp +++ b/src/vm/dllimportcallback.cpp @@ -961,11 +961,18 @@ void UMEntryThunk::Terminate() CONTRACTL { NOTHROW; + MODE_ANY; } CONTRACTL_END; m_code.Poison(); + if (GetObjectHandle()) + { + DestroyLongWeakHandle(GetObjectHandle()); + m_pObjectHandle = 0; + } + s_thunkFreeList.AddToList(this); } diff --git a/src/vm/dllimportcallback.h b/src/vm/dllimportcallback.h index 3d93d3263b..03be244e54 100644 --- a/src/vm/dllimportcallback.h +++ b/src/vm/dllimportcallback.h @@ -310,22 +310,6 @@ public: #endif } - ~UMEntryThunk() - { - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; - } - CONTRACTL_END; - - if (GetObjectHandle()) - { - DestroyLongWeakHandle(GetObjectHandle()); - } - } - void Terminate(); VOID RunTimeInit() |