[ox/std] Make MallocaPtr call destructor

This commit is contained in:
Gary Talent 2024-05-20 02:46:19 -05:00
parent 047b43968e
commit 87416e13ee

View File

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