Found a memory leak when I delete a ChunkArray. But I'm not sure how to fix it. How to a deallocate or recover the memory used in "buffer" ?
class Chunk : public CObject
void Serialize(CArchive& ar);
used = 0;
~Chunk() // 8.0.24
// How to clean buffer?
BYTE buffer[0x2000]; // 8KB
int used; // How many bytes of "buffer" are used
// Define an Array type for Chunk
typedef CArray<Chunk*, Chunk*> ChunkArray;