mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix a memory leak happened in table_test
This commit is contained in:
@@ -252,11 +252,14 @@ class BlockBasedTableConstructor: public Constructor {
|
|||||||
virtual Status FinishImpl(const Options& options, const KVMap& data) {
|
virtual Status FinishImpl(const Options& options, const KVMap& data) {
|
||||||
Reset();
|
Reset();
|
||||||
sink_.reset(new StringSink());
|
sink_.reset(new StringSink());
|
||||||
|
std::unique_ptr<FlushBlockBySizePolicyFactory> flush_policy_factory(
|
||||||
|
new FlushBlockBySizePolicyFactory(options.block_size,
|
||||||
|
options.block_size_deviation));
|
||||||
|
|
||||||
BlockBasedTableBuilder builder(
|
BlockBasedTableBuilder builder(
|
||||||
options,
|
options,
|
||||||
sink_.get(),
|
sink_.get(),
|
||||||
new FlushBlockBySizePolicyFactory(
|
flush_policy_factory.get(),
|
||||||
options.block_size, options.block_size_deviation),
|
|
||||||
options.compression);
|
options.compression);
|
||||||
|
|
||||||
for (KVMap::const_iterator it = data.begin();
|
for (KVMap::const_iterator it = data.begin();
|
||||||
|
|||||||
Reference in New Issue
Block a user