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

Method clear

Libraries/Containers/VirtualArray.h:31–39  ·  view source on GitHub ↗

@brief Clears the stable array by calling the destructor of each element. @note Does not release reserved memory (use release() for that).

Source from the content-addressed store, hash-verified

29 /// @brief Clears the stable array by calling the destructor of each element.
30 /// @note Does not release reserved memory (use release() for that).
31 void clear()
32 {
33 T* items = data();
34 while (sizeElements > 0)
35 {
36 sizeElements--;
37 items[sizeElements].~T();
38 }
39 }
40
41 /// @brief Clears the array calling destructors of each element and releases virtual memory.
42 [[nodiscard]] bool clearAndDecommit()

Callers

nothing calls this directly

Calls 1

dataFunction · 0.70

Tested by

no test coverage detected