@brief Clears the array calling destructors of each element and releases virtual memory.
| 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)); } |