Vector: Call destructors on deallocation
All checks were successful
continuous-integration/drone/push Build is passing

I hate the Gitea web editor on a phone.
This commit is contained in:
apio 2023-04-01 08:56:21 +00:00
parent e99ba4df36
commit e241c70aad

View File

@ -65,7 +65,13 @@ template <typename T> class Vector
~Vector()
{
if (m_data) free_impl(m_data);
if (m_data) {
for(const T& item : *this)
{
item.~T();
}
free_impl(m_data);
}
}
Result<void> try_reserve(usize capacity)