diff --git a/CHANGES.current b/CHANGES.current index 24c36d6a0a6..4fc30370ad4 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release. Version 3.0.6 (in progress) =========================== +2015-04-23: wsfulton + [Java] Bug #386 - Memory leak fix in (char *STRING, size_t LENGTH) typemaps. + 2015-04-23: vadz [Python] Make "default" typemap work again (#330, #377). diff --git a/Lib/java/java.swg b/Lib/java/java.swg index e7e041d1316..9374f5783e2 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -1346,7 +1346,8 @@ SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE) $input = jb; } %typemap(directorargout) (char *STRING, size_t LENGTH) -%{(jenv)->GetByteArrayRegion($input, 0, $2, (jbyte *)$1); %} +%{(jenv)->GetByteArrayRegion($input, 0, $2, (jbyte *)$1); +(jenv)->DeleteLocalRef($input);%} %apply (char *STRING, size_t LENGTH) { (char *STRING, int LENGTH) } /* java keywords */