BiteTheDDDDt commented on code in PR #12595: URL: https://github.com/apache/doris/pull/12595#discussion_r970416888
########## be/src/vec/olap/vcollect_iterator.cpp: ########## @@ -304,10 +311,12 @@ VCollectIterator::Level1Iterator::Level1Iterator( VCollectIterator::Level1Iterator::~Level1Iterator() { for (auto child : _children) { - if (child != nullptr) { - delete child; - child = nullptr; - } + delete child; + } + while (_heap != nullptr && !_heap->empty()) { + LevelIterator* it = _heap->top(); + delete it; + _heap->pop(); } if (_heap) { Review Comment: It looks like there is already the same logic in line322 -- 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