I have a class CPrimitive that holds a pointer to an UNLIT_VERTEX user defined structure. In my constructor I assign the UNLIT_VERTEX pointer to an array like this;
Unlit_Vertices = new UNLIT_VERTEX[size];
in the destructor which method is better(proper) for the deletion of Unlit_Vertices.
Code:delete Unlit_Vertices; or for(int i=0; i<size; i++) delete Unlit_Vertices[i];




Reply With Quote