Quote Originally Posted by streamer View Post
You don't have any problem.

However you should write

if(o1)
{
delete o1;
o1 = NULL;
}

Possibly you are not deleting Cell class properly,

If you have ie defined some variable globally, as
Cell g_MYCELLS[10][10];

destructor is called on the end of program exit if I know well.

You should put that in class somewhere and call the delete accordingly when program is exiting

class Game
{
Cell *pCells;

~Game()
{
if( pCells ) delete pCells
}
}
He's unconditionally setting them in the constructor.
Calling delete on a null pointer is okay.
There's no point in setting their value to NULL in a destructor because they won't be accessible again anyway.