diff --git a/Lib/java/typemaps.i b/Lib/java/typemaps.i index 48edf2c94..cec34bc53 100644 --- a/Lib/java/typemaps.i +++ b/Lib/java/typemaps.i @@ -153,7 +153,7 @@ } } /* free resource once finished using */ -%typemap(java,argout) const string & { +%typemap(java,freearg) const string & { delete $target; }