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 2020/12/12 06:48:21 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #5073: [Bug] Fix Memory Leak in Json Load

imay commented on a change in pull request #5073:
URL: https://github.com/apache/incubator-doris/pull/5073#discussion_r541517895



##########
File path: be/src/exec/local_file_reader.cpp
##########
@@ -53,21 +53,17 @@ bool LocalFileReader::closed() {
 }
 
 // Read all bytes
-Status LocalFileReader::read_one_message(uint8_t** buf, size_t* length) {
+Status LocalFileReader::read_one_message(std::unique_ptr<uint8_t[]>& buf, size_t* length) {

Review comment:
       Use pointer if the parameter will be changed.
   Use reference with const 
   ```suggestion
   Status LocalFileReader::read_one_message(std::unique_ptr<uint8_t[]>* buf, size_t* length) {
   ```




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

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