xinyiZzz commented on code in PR #9301: URL: https://github.com/apache/incubator-doris/pull/9301#discussion_r863547703
########## be/src/olap/tablet_schema.cpp: ########## @@ -408,8 +428,8 @@ void TabletSchema::init_from_pb(const TabletSchemaPB& schema) { _num_null_columns = 0; _cols.clear(); _field_name_to_index.clear(); + TabletColumn column; for (auto& column_pb : schema.column()) { Review Comment: `std::move(column)` will only consume the old value, the memory of `column` is still preserved. The purpose of moving the `TabletColumn column` outside the loop here is to reduce memory allocation. -- 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