[ox/std] Make MallocaPtr call destructor
This commit is contained in:
parent
047b43968e
commit
87416e13ee
1
deps/ox/src/ox/std/new.hpp
vendored
1
deps/ox/src/ox/std/new.hpp
vendored
@ -102,6 +102,7 @@ class MallocaPtr {
|
||||
}
|
||||
|
||||
constexpr ~MallocaPtr() noexcept {
|
||||
m_val->~T();
|
||||
if (m_onHeap && m_val) {
|
||||
delete[] reinterpret_cast<uint8_t*>(m_val);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user