I'm am trying to write a little program/algorithm in C++. I have defined my own data type and created an array of this data type using the new operator. I try to return this memory to the system by using the delete operator on my array, but it seems to crash my program. The program compiles okay, but when I run it, I get the message
If I don't use the delete operator then the program runs without crashing. The problem with this, is that I'm under the impression that every new should be matched with a delete. Does anyone know why my program is crashing?
2 [sig] a 2216 open_stackdumpfile: Dumping stack trace to a.exe.stackdump
14277 [sig] a 2216 e:\working\a.exe: *** fatal error - called with threadlist_ix -1