When I program using havok, I had a crash when exiting the program,
I have an envlope of the havok function for the C ++ class to make the main function simple, and I call the havok quit functions in the destructor of my class, but this may cause an “Unhandled exception” to fail.
If I get the hook out of the destructor function and put it in the main function, everything will be fine. I just wondered why this does not work in the destructor, but it works in the main function?
my code is:
int HK_CALL main(int argc, const char** argv)
{
HKUTI *myhk = new HKUTI(setupPhysics, 1000);
myhk->run(displayGraphics, 60, 30);
delete(myhk);
myhk = NULL;
hkBaseSystem::quit();
hkMemoryInitUtil::quit();
return 0;
}
havok quit - hkBaseSystem:: quit(); hkMemoryInitUtil:: quit();
, , , 2 quit HKUTI, , . - , - , ++?