philix commented on a change in pull request #12621:
URL: https://github.com/apache/arrow/pull/12621#discussion_r827062781
##########
File path: cpp/src/arrow/table.cc
##########
@@ -601,6 +602,19 @@ TableBatchReader::TableBatchReader(const Table& table)
}
}
+TableBatchReader::TableBatchReader(std::shared_ptr<Table> table)
+ : table_(*table.get()),
+ owned_table_(std::move(table)),
Review comment:
This should probably be declared before `table_` since `table_` is
`*owned_table_`. It doesn't matter much now, but if another member that takes
`Table &` were to be introduced here, it would have a `Table &` pointing to
freed memory when everything is destroyed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]