* @brief Destroy the stack object. */
| 246 | * @brief Destroy the stack object. |
| 247 | */ |
| 248 | ~stack() noexcept { |
| 249 | LF_ASSERT(m_fib); |
| 250 | LF_ASSERT(!m_fib->m_prev); // Should only be destructed at the root. |
| 251 | m_fib->set_next(nullptr); // Free a cached stacklet. |
| 252 | std::free(m_fib); // NOLINT |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * @brief Test if the stack is empty (has no allocations). |