You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/11 11:36:40 UTC

[GitHub] [doris] xiaokang commented on a diff in pull request #10772: fix Level1Iterator memory leak

xiaokang commented on code in PR #10772:
URL: https://github.com/apache/doris/pull/10772#discussion_r917831368


##########
be/src/vec/olap/vcollect_iterator.cpp:
##########
@@ -260,6 +260,14 @@ VCollectIterator::Level1Iterator::~Level1Iterator() {
             child = nullptr;
         }
     }
+
+    if (_heap) {
+        while (!_heap->empty()) {
+            auto child = _heap->top();
+            _heap->pop();
+            if (child) delete child;

Review Comment:
   at line 327, _children.clear() is called after child is added to _heap.



-- 
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-unsubscribe@doris.apache.org

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


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