xinyiZzz commented on code in PR #32039:
URL: https://github.com/apache/doris/pull/32039#discussion_r1527680456


##########
be/src/olap/memtable.cpp:
##########
@@ -161,6 +155,15 @@ MemTable::~MemTable() {
             << std::endl
             << MemTracker::log_usage(_insert_mem_tracker->make_snapshot());
     DCHECK_EQ(_flush_mem_tracker->consumption(), 0);
+    _arena.reset();
+    _agg_buffer_pool.clear();
+    _vec_row_comparator.reset();
+    _input_mutable_block.clear_column_data();

Review Comment:
   fixed



##########
be/src/vec/exec/scan/scanner_context.h:
##########
@@ -100,7 +108,15 @@ class ScannerContext : public 
std::enable_shared_from_this<ScannerContext>,
                    int64_t max_bytes_in_blocks_queue, const int 
num_parallel_instances = 1,
                    pipeline::ScanLocalStateBase* local_state = nullptr);
 
-    virtual ~ScannerContext() = default;
+    ~ScannerContext() override {
+        
SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(_query_thread_context.query_mem_tracker);
+        _blocks_queue.clear();
+        vectorized::BlockUPtr block;
+        while (_free_blocks.try_dequeue(block)) {
+            // do nothing
+        }
+        block.release();

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to