Shutdown cleanly (prevents Kaffe from trapping on exit)

This commit is contained in:
Sam Ruby 2000-01-28 00:32:28 +00:00
parent b87e48802e
commit 302ccb0d97
2 changed files with 10 additions and 4 deletions

View file

@ -101,12 +101,15 @@ PHP_INI_END()
*/
void jvm_destroy() {
if (php_reflect) (*jenv)->DeleteGlobalRef(jenv, php_reflect);
if (jvm) (*jvm)->DestroyJavaVM(jvm);
if (jvm) {
(*jvm)->DetachCurrentThread(jvm);
(*jvm)->DestroyJavaVM(jvm);
jvm = 0;
}
#if !(WIN32||WINNT)
if (javadl) dlclose(javadl);
#endif
php_reflect = 0;
jvm = 0;
jenv = 0;
}