Fix for SourceForge Bug #1283.

* Change the name of the memory own variable for base java director classes to match that expected by the director code
* Add conditional to appropriately dynamically cast director classes wrapped in smart pointers.
This commit is contained in:
Brant K. Kyser 2013-01-03 14:54:06 -06:00 committed by William S Fulton
commit 540ede0dd3
2 changed files with 23 additions and 7 deletions

View file

@ -146,10 +146,10 @@
// Base proxy classes
%typemap(javabody) TYPE %{
private long swigCPtr;
private boolean swigCMemOwnBase;
private boolean swigCMemOwn;
PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwnBase = cMemoryOwn;
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
@ -176,8 +176,8 @@
%typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") TYPE {
if (swigCPtr != 0) {
if (swigCMemOwnBase) {
swigCMemOwnBase = false;
if (swigCMemOwn) {
swigCMemOwn = false;
$jnicall;
}
swigCPtr = 0;