mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Shutdown cleanly (prevents Kaffe from trapping on exit)
This commit is contained in:
parent
b87e48802e
commit
302ccb0d97
2 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue