JNI ColumnFamilyHandle#getDescriptor method leaks memory
Open
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
### Expected behavior
Calling `ColumnFamilyHandle#getDescriptor()` should produce either a `ColumnFamilyDescriptor` that can be `close()`d to free the native memory backing it, or no native allocation should occur.
### Actual behavior
Calling `ColumnFamilyHandle#getDescriptor()` allocates a native `rocksdb::db::ColumnFamilyDescriptor`, copying the name and options from the handle. Since the Java `ColumnFamilyDescriptor` is not a `RocksObject`, this memory cannot be tracked/freed from Java.
### Steps to reproduce the behavior
Call `ColumnFamilyHandle#getDescriptor()` repeatedly from Java and monitor memory usage.
Contributor guide
Assessment
This issue has not been assessed yet.