tecbot / gorocksdb

gorocksdb is a Go wrapper for RocksDB
http://rocksdb.org
MIT License
935 stars 269 forks source link

Possible memory leak #132

Open minaevmike opened 6 years ago

minaevmike commented 6 years ago

While creating bloom filter C fucntion rocksdb_filterpolicy_create_bloom called. But there is no api to free this memory. Seems rocksdb_filterpolicy_destroy (https://github.com/facebook/rocksdb/blob/master/include/rocksdb/c.h#L1030 ) must be called to free it.

qieqieplus commented 3 years ago

For most cases, if you use SetFilterPolicy, FilterPolicy will be owned by BlockBasedTableOptions(as a shared_ptr member), freed alongside with its destruction.