]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
JNI native memory leak - release array elements (#10981)
authorAlan Paxton <alan.paxton@gmail.com>
Wed, 14 Dec 2022 18:49:32 +0000 (10:49 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 14 Dec 2022 18:49:32 +0000 (10:49 -0800)
commit6a8920f988f66fdddf8db5f1fdbd2bbec8254b1a
treec6da4e84601136788b0991f23ccd0c2164efea99
parentc93ba7db5ddc33f69f8f049cc59454985b17dc46
JNI native memory leak - release array elements (#10981)

Summary:
Closes https://github.com/facebook/rocksdb/issues/10980

Reproduced as per the suggestion in the ticket, and `$ jcmd <PID> VM.native_memory | grep Internal` reports that we are no longer leaking internal memory with the suggested fix.

I did the repro in `MultiGetTest.java` which I have optimized imports on. It did not seem helpful to leave the test code around as it would be onerous to build a memory leak reproducer, and regression seems a remote possibility.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10981

Reviewed By: riversand963

Differential Revision: D41498748

Pulled By: ajkr

fbshipit-source-id: 8c6dd0d608172879c8bda479c7c9c05c12d34e70
java/rocksjni/rocksjni.cc
java/src/test/java/org/rocksdb/MultiGetTest.java