Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
72473cd6
Commit
72473cd6
authored
Jun 28, 2017
by
ShuYu Wang
Committed by
siddontang
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rocksdb_options: fix #77 memory leaks in cache (#78)
parent
f7c020d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
rocksdb_options.rs
src/rocksdb_options.rs
+1
-2
No files found.
src/rocksdb_options.rs
View file @
72473cd6
...
...
@@ -73,9 +73,8 @@ impl BlockBasedOptions {
pub
fn
set_lru_cache
(
&
mut
self
,
size
:
size_t
)
{
let
cache
=
crocksdb_ffi
::
new_cache
(
size
);
unsafe
{
// because cache is wrapped in shared_ptr, so we don't need to call
// rocksdb_cache_destroy explicitly.
crocksdb_ffi
::
crocksdb_block_based_options_set_block_cache
(
self
.inner
,
cache
);
crocksdb_ffi
::
crocksdb_cache_destroy
(
cache
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment