ndcoslo2019 icon indicating copy to clipboard operation
ndcoslo2019 copied to clipboard

kvector has memory leak

Open baget opened this issue 5 years ago • 1 comments

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.

baget avatar Jun 28 '19 19:06 baget

As well it doesn't check Allocate return value

reuvenab avatar Jul 04 '19 11:07 reuvenab