zzzzwj commented on code in PR #33703:
URL: https://github.com/apache/arrow/pull/33703#discussion_r1072169620


##########
cpp/src/parquet/arrow/test_util.h:
##########
@@ -463,12 +463,16 @@ Status MakeEmptyListsArray(int64_t size, 
std::shared_ptr<Array>* out_array) {
   return Status::OK();
 }
 
+// Please make sure that the return value should have an object assigned 
explicitly
+// if you want to use the pointer contained.

Review Comment:
   Hi pitrou. I think I misunderstood the meaning of 
[emkornfield](https://github.com/emkornfield). According to 
https://github.com/apache/arrow/issues/14748#issuecomment-1333336429, I thought 
that when a function returns a shared_ptr containing a new object (the pointer 
contained is allocated in the function), then it need to add the comment "sth. 
must not outlive some object". This function is static, which belongs to no 
object. So, I put my word to replace that comment. And you can refer to #14748, 
I open that issue because I directly used the bare pointer without explicitly 
assignment to an object, and it causes the access violation.



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

Reply via email to