cube problem: deleting meshes and made the destructor virtual