Skip to content

Commit 9279241

Browse files
jameseh96daverigby
authored andcommitted
RocksDB: Make ownership of FlushStartListener clearer
Change-Id: Ie74675c62914db4566c04de09c042481dd263118 Reviewed-on: http://review.couchbase.org/82750 Reviewed-by: Dave Rigby <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent 5ab75e8 commit 9279241

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

engines/ep/src/rocksdb-kvstore/rocksdb-kvstore.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ void RocksDBKVStore::open() {
4949
/* Use a listener to set the appropriate engine in the
5050
* flusher threads RocksDB creates. We need the flusher threads to
5151
* account for news/deletes against the appropriate bucket. */
52-
FlushStartListener* fsl =
53-
new FlushStartListener(ObjectRegistry::getCurrentEngine());
54-
52+
auto fsl = std::make_shared<FlushStartListener>(
53+
ObjectRegistry::getCurrentEngine());
5554
rdbOptions.listeners.emplace_back(fsl);
5655

5756
const std::string dbdir = configuration.getDBName();

0 commit comments

Comments
 (0)