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:
parent
b7057f7ae8
commit
4ad8d458d2
4 changed files with 31 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue