c++ - Critical error while freeing memory -
I have a buffer containing structure for the index (DirectX, but I think it does not matter):
structure index {CComPtr & lt; ID3D11Buffer & gt; Buffer; UINT Index; };
and a way that starts the array with the object of the class index:
mindex = new indices * [layers]; For (int i = 0; i
and method that frees memory:
for (int i = 0; i & lt; layers ; ++ i) Delete Mindice [i]; // Here I'm getting important error removal minduses;
But when I try to release memory I get "serious error detected c0000374" (as mentioned in the code above).
Can you help me, please? I hope the posted problem will be enough to solve my problem.
Thanks
Since you are allocating to the array, Should be removed. Use Delete]]
instead of Delete
.
Comments
Post a Comment