diff options
author | David Mason <davmason@microsoft.com> | 2018-09-14 20:44:58 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-09-14 20:44:58 -0700 |
commit | 73a0bc0d549d1c8e41261891dcc2974fb8024556 (patch) | |
tree | 5bab684972d7698b6390009b923244769e82d2a5 /src/gc | |
parent | 31c71908203752358dc69dbdf92d707528a8c8b4 (diff) | |
download | coreclr-73a0bc0d549d1c8e41261891dcc2974fb8024556.tar.gz coreclr-73a0bc0d549d1c8e41261891dcc2974fb8024556.tar.bz2 coreclr-73a0bc0d549d1c8e41261891dcc2974fb8024556.zip |
convert HandleStore::_underlyingBucket to a pointer (#19935)
* convert HandleStore::_underlyingBucket to a pointer
* undo _underlyingBucket pointer change and delete Ref_CreateHandleTableBucket
* update comment
Diffstat (limited to 'src/gc')
-rw-r--r-- | src/gc/gchandletable.cpp | 2 | ||||
-rw-r--r-- | src/gc/objecthandle.cpp | 16 | ||||
-rw-r--r-- | src/gc/objecthandle.h | 1 |
3 files changed, 2 insertions, 17 deletions
diff --git a/src/gc/gchandletable.cpp b/src/gc/gchandletable.cpp index 7389706897..ad3c6e23c8 100644 --- a/src/gc/gchandletable.cpp +++ b/src/gc/gchandletable.cpp @@ -99,7 +99,9 @@ IGCHandleStore* GCHandleManager::CreateHandleStore(void* context) #ifndef FEATURE_REDHAWK GCHandleStore* store = new (nothrow) GCHandleStore(); if (store == nullptr) + { return nullptr; + } bool success = ::Ref_InitializeHandleTableBucket(&store->_underlyingBucket, context); if (!success) diff --git a/src/gc/objecthandle.cpp b/src/gc/objecthandle.cpp index d6ca8a5fa4..347ba34b4b 100644 --- a/src/gc/objecthandle.cpp +++ b/src/gc/objecthandle.cpp @@ -689,21 +689,6 @@ void Ref_Shutdown() } #ifndef FEATURE_REDHAWK -HandleTableBucket* Ref_CreateHandleTableBucket(void* context) -{ - HandleTableBucket* result = new (nothrow) HandleTableBucket(); - if (result == nullptr) - return nullptr; - - if (!Ref_InitializeHandleTableBucket(result, context)) - { - delete result; - return nullptr; - } - - return result; -} - bool Ref_InitializeHandleTableBucket(HandleTableBucket* bucket, void* context) { CONTRACTL @@ -836,7 +821,6 @@ void Ref_DestroyHandleTableBucket(HandleTableBucket *pBucket) HndDestroyHandleTable(pBucket->pTable[uCPUindex]); } delete [] pBucket->pTable; - delete pBucket; } int getSlotNumber(ScanContext* sc) diff --git a/src/gc/objecthandle.h b/src/gc/objecthandle.h index 6563d9661b..7c44b34ffd 100644 --- a/src/gc/objecthandle.h +++ b/src/gc/objecthandle.h @@ -78,7 +78,6 @@ int GetCurrentThreadHomeHeapNumber(); */ bool Ref_Initialize(); void Ref_Shutdown(); -HandleTableBucket* Ref_CreateHandleTableBucket(void* context); bool Ref_InitializeHandleTableBucket(HandleTableBucket* bucket, void* context); BOOL Ref_HandleAsyncPinHandles(async_pin_enum_fn callback, void* context); void Ref_RelocateAsyncPinHandles(HandleTableBucket *pSource, HandleTableBucket *pTarget, void (*clearIfComplete)(Object*), void (*setHandle)(Object*, OBJECTHANDLE)); |