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

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -