[ox/std] Make MallocaPtr call destructor
All checks were successful
Build / build (push) Successful in 3m10s

This commit is contained in:
Gary Talent 2024-05-20 02:46:19 -05:00
parent abba35d64e
commit 4c7fc5f9b4

View File

@ -102,6 +102,7 @@ class MallocaPtr {
} }
constexpr ~MallocaPtr() noexcept { constexpr ~MallocaPtr() noexcept {
m_val->~T();
if (m_onHeap && m_val) { if (m_onHeap && m_val) {
delete[] reinterpret_cast<uint8_t*>(m_val); delete[] reinterpret_cast<uint8_t*>(m_val);
} }