MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / clearAndDecommit

Method clearAndDecommit

Libraries/Containers/VirtualArray.h:42–46  ·  view source on GitHub ↗

@brief Clears the array calling destructors of each element and releases virtual memory.

Source from the content-addressed store, hash-verified

40
41 /// @brief Clears the array calling destructors of each element and releases virtual memory.
42 [[nodiscard]] bool clearAndDecommit()
43 {
44 clear();
45 return decommit();
46 }
47
48 /// @brief De-commits unused-memory, while still keeping the original virtual reservation
49 [[nodiscard]] bool decommit() { return virtualMemory.decommit(sizeElements * sizeof(T)); }

Callers 2

stopMethod · 0.80
stopMethod · 0.80

Calls 1

clearFunction · 0.85

Tested by

no test coverage detected