Add DetachCurrentThread back in for directors. The problems occuring on Solaris look like they were jdk bugs (1.4.2 and older)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9983 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2c46b7832c
commit
fd851b9380
2 changed files with 6 additions and 5 deletions
|
|
@ -116,7 +116,11 @@ namespace Swig {
|
|||
director_->swig_jvm_->AttachCurrentThread((void **) &jenv_, NULL);
|
||||
}
|
||||
~JNIEnvWrapper() {
|
||||
//director_->swig_jvm_->DetachCurrentThread();
|
||||
// Some JVMs, eg JDK 1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call.
|
||||
// However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak.
|
||||
#if !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD)
|
||||
director_->swig_jvm_->DetachCurrentThread();
|
||||
#endif
|
||||
}
|
||||
JNIEnv *getJNIEnv() const {
|
||||
return jenv_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue