Avoid potential race conditions on the delete() method

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9443 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-10-12 21:36:06 +00:00
commit 4ad8d458d2
4 changed files with 31 additions and 7 deletions

View file

@ -1133,7 +1133,7 @@ SWIG_PROXY_CONSTRUCTOR(true, false, TYPENAME)
// Set the default for SWIGTYPE: Java owns the C/C++ object.
SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)
%typemap(javadestruct, methodname="delete") SWIGTYPE {
%typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
$jnicall;
@ -1141,7 +1141,7 @@ SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)
swigCPtr = 0;
}
%typemap(javadestruct_derived, methodname="delete") SWIGTYPE {
%typemap(javadestruct_derived, methodname="delete", methodmodifiers="public synchronized") SWIGTYPE {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
$jnicall;