When I exit my C ++ program, it crashes with errors, for example:
EAccessViolation with mesage 'Access violation at address 0...
and
Abnormal Program Termination
This is probably caused by some kind of destructor, because it only happens when the application exits. I use several external libraries and cannot find the code that calls it. Is there a function that forces the program to exit immediately (something like kill on Linux), so that memory must be freed by the operating system? I could use this function in the application exit event.
I know this will be a terrible decision, because it will just hide the problem.
I just ask out of curiosity, so please don't give me -1 :)
I tried exit(0)from stdlib but that didn't help.
EDIT:
:)
Builder ++ 6 ( , , ). (FANN). , , :
~neural_net()
{
destroy();
}
destroy() fann_safe_free (ptr), :
#define fann_safe_free(x) {if(x) { free(x); x = NULL; }}
, . . , .
n- ( -), :)