MCPcopy Create free account
hub / github.com/NativeScript/android / destroy

Method destroy

test-app/runtime/src/main/cpp/robin_hood.h:2464–2481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2462 }
2463
2464 void destroy() {
2465 if (0 == mMask) {
2466 // don't deallocate!
2467 return;
2468 }
2469
2470 Destroyer<Self, IsFlat && std::is_trivially_destructible<Node>::value>{}
2471 .nodesDoNotDeallocate(*this);
2472
2473 // This protection against not deleting mMask shouldn't be needed as it's sufficiently
2474 // protected with the 0==mMask check, but I have this anyways because g++ 7 otherwise
2475 // reports a compile error: attempt to free a non-heap object 'fm'
2476 // [-Werror=free-nonheap-object]
2477 if (mKeyVals != reinterpret_cast_no_cast_align_warning<Node*>(&mMask)) {
2478 ROBIN_HOOD_LOG("std::free")
2479 std::free(mKeyVals);
2480 }
2481 }
2482
2483 void init() noexcept {
2484 mKeyVals = reinterpret_cast_no_cast_align_warning<Node*>(&mMask);

Callers 3

nodesMethod · 0.45
shiftDownMethod · 0.45
emplaceMethod · 0.45

Calls 1

nodesDoNotDeallocateMethod · 0.45

Tested by

no test coverage detected