There's the culprit! According to the report, there is a new[] without delete[] in FileLoader::operator()().
No, this is just like it has to be.
There's a Delete( ) operation done.
But I can't find ANYWHERE the function "Delete" (with uppercase).
It is a function that has been in
globals.h for many months, and which is now in
prep.h (so it's available everywhere).
What it does is, it calls the C++ delete operator on a pointer-to-object and (within thread scope) atomically zeroes the pointer.
I added this many months ago in response to the crashes that were caused by code like
if(pointer)
delete pointer;...which does not only contain an unnecessary
if() but which was also the reason for regular mysterious crashes when a pointer was not set to zero after being delted, and subsequently was deleted a second time.
Except for member pointers that are deleted in class destructors,
Delete() should always be used in preference to
delete.
Using
Delete() in a class destructor is of course possible, but since the members are invalid after this, there is unnecessary overhead in zeroing the pointer.