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:25:13 UTC

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

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


##########
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:
   all elements in _heap are also in _children. Already delete in line 257, maybe double delete here.



-- 
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