[kutil] Don't use delete on non-new pointers
`kutil::vector` was calling `operator delete []` on memory that had not been allocated with `operator new []`, and so was deleting the wrong pointer. Tags: bug memory allocator
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
||||
~vector()
|
||||
{
|
||||
while (m_size) remove();
|
||||
delete [] m_elements;
|
||||
m_alloc.free(m_elements);
|
||||
}
|
||||
|
||||
/// Get the size of the array.
|
||||
|
||||
Reference in New Issue
Block a user