Quote Originally Posted by ZuK View Post
No. It should be

Code:
Terrain::~Terrain() {
	for (int i=0; i<x; i++)   // you have to store x and y as class members
		delete [] terrainArray[i];
	delete [] terrainArray;
}
Kurt
Thanks, I had a feeling this wouldn't free all the memory. Storing x and y as class members isn't a problem. I was probably going to do that anyway since when I draw the terrain I will need to know how many times I have to loop. That way i can just ask for terrain->x and terrain->y.