• Forum
  • Lounge
  • freeing dynamic arrays created in a clas

 
freeing dynamic arrays created in a class

declared double * *NextMonthValues; as private in my class used in dll

when I include following code in the destructor:

for (int i=0; i < 10; ++i)
delete [] ThisMonthValues[i];
delete [] ThisMonthValues;

for (int i=0; i<SSMatrix[8][11]; ++i)
delete [] NextMonthValues[i];
delete [] NextMonthValues;

the app calling the dll crashes.

If I put the cod in a "clean" up routine it works fine

Any help
Welcome to the forum of insane geeks who hate cross-posting, especially when one of the posts is in the wrong forum.

-Albatross
Topic archived. No new replies allowed.