Fix Vector::resize to delete old array
This commit is contained in:
parent
48de8f2561
commit
ebdd31315d
1
deps/ox/src/ox/std/vector.hpp
vendored
1
deps/ox/src/ox/std/vector.hpp
vendored
@ -110,6 +110,7 @@ void Vector<T>::resize(size_t size) {
|
|||||||
m_items[i] = oldItems[i];
|
m_items[i] = oldItems[i];
|
||||||
}
|
}
|
||||||
m_size = size;
|
m_size = size;
|
||||||
|
delete[] oldItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user