ndcoslo2019
ndcoslo2019 copied to clipboard
kvector has memory leak
in resize:
void Resize(ULONG capacity) {
T* array = Allocate(m_Capacity = capacity);
memcpy(array, m_array, sizeof(T) * m_Size);
m_array = array;
}
you allocate a new array but never free the prev one.
As well it doesn't check Allocate return value