Pb with array of classes


Me again, sorry.

I have an exception raised by Juce when I’m trying to delete an array, i.e. calling

delete[] peaksArray;

Of course peaksArray is not NULL at that point.

My array is defined as


// structure to store min & max points of a block class BlockMinMax { public: float min; float max; };

Any idea ?
Maybe I shouldn’t use the new operator with arrays ?
I saw the juce_malloc macro but doesn’t know it I must use something else than new for arrays of classes.



Forget it! A newbie problem.
I just had written past the end of the array before killing it…