diff options
-rw-r--r-- | src/gc/objecthandle.h | 11 | ||||
-rw-r--r-- | src/vm/gchandleutilities.h | 6 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/gc/objecthandle.h b/src/gc/objecthandle.h index c320dcc3a9..b3e4b58a1c 100644 --- a/src/gc/objecthandle.h +++ b/src/gc/objecthandle.h @@ -80,17 +80,6 @@ void GCHandleValidatePinnedObject(OBJECTREF obj); int GetCurrentThreadHomeHeapNumber(); -inline void ResetOBJECTHANDLE(OBJECTHANDLE handle) -{ - WRAPPER_NO_CONTRACT; - - HndAssignHandle(handle, NULL); -} - -#ifndef FEATURE_REDHAWK -typedef Holder<OBJECTHANDLE,DoNothing<OBJECTHANDLE>,ResetOBJECTHANDLE> ObjectInHandleHolder; -#endif - /* * Table maintenance routines */ diff --git a/src/vm/gchandleutilities.h b/src/vm/gchandleutilities.h index 41b6317084..64e13a64ac 100644 --- a/src/vm/gchandleutilities.h +++ b/src/vm/gchandleutilities.h @@ -196,6 +196,11 @@ inline void* InterlockedCompareExchangeObjectInHandle(OBJECTHANDLE handle, OBJEC return GCHandleUtilities::GetGCHandleManager()->CompareAndSwapObjectInHandle(handle, OBJECTREFToObject(object), OBJECTREFToObject(comparandObject)); } +inline void ResetOBJECTHANDLE(OBJECTHANDLE handle) +{ + GCHandleUtilities::GetGCHandleManager()->StoreObjectInHandle(handle, NULL); +} + // Handle destruction convenience functions inline void DestroyHandle(OBJECTHANDLE handle) @@ -336,6 +341,7 @@ typedef Wrapper<OBJECTHANDLE, DoNothing<OBJECTHANDLE>, DestroyRefcountedHandle> typedef Holder<OBJECTHANDLE, DoNothing<OBJECTHANDLE>, DestroyLongWeakHandle> LongWeakHandleHolder; typedef Holder<OBJECTHANDLE, DoNothing<OBJECTHANDLE>, DestroyGlobalStrongHandle> GlobalStrongHandleHolder; typedef Holder<OBJECTHANDLE, DoNothing<OBJECTHANDLE>, DestroyGlobalShortWeakHandle> GlobalShortWeakHandleHolder; +typedef Holder<OBJECTHANDLE, DoNothing<OBJECTHANDLE>, ResetOBJECTHANDLE> ObjectInHandleHolder; class RCOBJECTHANDLEHolder : public RefCountedOHWrapper { |