extern "C" void __stdcall init_emu_environ();
extern "C" void __stdcall update_emu_environ();
+extern "C" void __stdcall cleanup_emu_environ();
//
// Utility function used to copy files from the application bundle
// we may not get to finish the run cycle but exit immediately after a call to g_application.Stop()
// so we may never get to Destroy() in CXBApplicationEx::Run(), we call it here.
Destroy();
+ cleanup_emu_environ();
//
Sleep(200);
}
}
+extern "C" void __stdcall cleanup_emu_environ()
+{
+ for (int i = 0; i < EMU_MAX_ENVIRONMENT_ITEMS; i++)
+ {
+ free(dll__environ[i]);
+ dll__environ[i] = NULL;
+ }
+}
+
static int convert_fmode(const char* mode)
{
int iMode = O_BINARY;