suppose in a class I create an array
and initialise it
myarray = new float;
and the destructor calls:
when I run the app, and quit (apple-Q) I find I get a pointer freed was not allocated error. But pressing stop (top left in X-Code is fine).
Is what I’m doing correct?
How should I understand what quitting the app is doing? Clearly some kind of error here, but I don’t see what’s wrong yet in this way of doing it.