freeing memory

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

I allocated memory via new

when I include following code in the destructor:

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

the app calling the dll crashes.

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

Any help
Topic archived. No new replies allowed.