You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by sh...@apache.org on 2016/08/23 21:30:45 UTC
reef git commit: [REEF-1539] Fix memory leak in InteropUtil.cpp
Repository: reef
Updated Branches:
refs/heads/master c01d94737 -> addd62328
[REEF-1539] Fix memory leak in InteropUtil.cpp
This addressed the issue by
* Release the bytes generated in ManagedByteArrayFromJavaByteArray.
JIRA:
[REEF-1539](https://issues.apache.org/jira/browse/REEF-1539)
Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/addd6232
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/addd6232
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/addd6232
Branch: refs/heads/master
Commit: addd62328d77b5f0f227eb8a448c77dd0a75461e
Parents: c01d947
Author: pchung13 <me...@patrickchung.net>
Authored: Tue Aug 23 10:18:35 2016 -0700
Committer: Boris Shulman <sh...@gmail.com>
Committed: Tue Aug 23 14:29:12 2016 -0700
----------------------------------------------------------------------
lang/cs/Org.Apache.REEF.Bridge/InteropUtil.cpp | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/reef/blob/addd6232/lang/cs/Org.Apache.REEF.Bridge/InteropUtil.cpp
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Bridge/InteropUtil.cpp b/lang/cs/Org.Apache.REEF.Bridge/InteropUtil.cpp
index 9f676ce..89e0e34 100644
--- a/lang/cs/Org.Apache.REEF.Bridge/InteropUtil.cpp
+++ b/lang/cs/Org.Apache.REEF.Bridge/InteropUtil.cpp
@@ -101,6 +101,7 @@ array<byte>^ ManagedByteArrayFromJavaByteArray(
for (int i = 0; i < len; i++) {
managedByteArray[i] = bytes[i];
}
+ env->ReleaseByteArrayElements(javaByteArray, (jbyte*)bytes, JNI_ABORT);
return managedByteArray;
}
return nullptr;