MCPcopy Create free account
hub / github.com/cpputest/cpputest / restore

Method restore

src/CppUTest/TestMemoryAllocator.cpp:125–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void GlobalMemoryAllocatorStash::restore()
126{
127 if (originalMallocAllocator) setCurrentMallocAllocator(originalMallocAllocator);
128 if (originalNewAllocator) setCurrentNewAllocator(originalNewAllocator);
129 if (originalNewArrayAllocator) setCurrentNewArrayAllocator(originalNewArrayAllocator);
130}
131
132TestMemoryAllocator::TestMemoryAllocator(const char* name_str, const char* alloc_name_str, const char* free_name_str)
133 : name_(name_str), alloc_name_(alloc_name_str), free_name_(free_name_str), hasBeenDestroyed_(false)

Callers

nothing calls this directly

Calls 3

setCurrentNewAllocatorFunction · 0.85

Tested by

no test coverage detected