bkietz commented on a change in pull request #7156:
URL: https://github.com/apache/arrow/pull/7156#discussion_r426702864



##########
File path: cpp/src/arrow/python/common.h
##########
@@ -170,17 +176,23 @@ class ARROW_PYTHON_EXPORT OwnedRef {
  private:
   ARROW_DISALLOW_COPY_AND_ASSIGN(OwnedRef);
 
-  PyObject* obj_;
+  PyObject* obj_ = NULLPTR;
 };
 
 // Same as OwnedRef, but ensures the GIL is taken when it goes out of scope.
 // This is for situations where the GIL is not always known to be held
 // (e.g. if it is released in the middle of a function for performance reasons)
 class ARROW_PYTHON_EXPORT OwnedRefNoGIL : public OwnedRef {
  public:
-  OwnedRefNoGIL() : OwnedRef() {}
-  OwnedRefNoGIL(OwnedRefNoGIL&& other) : OwnedRef(other.detach()) {}
-  explicit OwnedRefNoGIL(PyObject* obj) : OwnedRef(obj) {}
+  using OwnedRef::OwnedRef;
+  OwnedRefNoGIL() = default;
+  OwnedRefNoGIL(OwnedRefNoGIL&& other) = default;

Review comment:
       It uses the default, which is to use the move constructors of data 
members and base classes




----------------------------------------------------------------
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:
[email protected]


Reply via email to