Fixed a memory leak for java STRING_ARRAY
The allocation loop uses size, so the free loop should do the same, not size-1.
This commit is contained in:
parent
d0cb2b73db
commit
43032339d0
1 changed files with 1 additions and 1 deletions
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
%typemap(freearg) char **STRING_ARRAY {
|
||||
int i;
|
||||
for (i=0; i<size$argnum-1; i++)
|
||||
for (i=0; i<size$argnum; i++)
|
||||
#ifdef __cplusplus
|
||||
delete[] $1[i];
|
||||
delete[] $1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue