[ox/std] Make MallocaPtr call destructor
All checks were successful
Build / build (push) Successful in 3m10s
All checks were successful
Build / build (push) Successful in 3m10s
This commit is contained in:
parent
abba35d64e
commit
4c7fc5f9b4
1
deps/nostalgia/deps/ox/src/ox/std/new.hpp
vendored
1
deps/nostalgia/deps/ox/src/ox/std/new.hpp
vendored
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user