Code review changes.

pull/13984/head
Mark D. Roth 7 years ago
parent f512c0d048
commit 2b19f4922d
  1. 9
      src/core/lib/support/orphanable.h
  2. 4
      src/core/lib/support/ref_counted_ptr.h

@ -31,11 +31,16 @@
namespace grpc_core {
// A base class for orphanable objects.
// A base class for orphanable objects, which have one external owner
// but are not necessarily destroyed immediately when the external owner
// gives up ownership. Instead, the owner calls the object's Orphan()
// method, and the object then takes responsibility for its own cleanup
// and destruction.
class Orphanable {
public:
// Gives up ownership of the object. The implementation must arrange
// to destroy the object without further interaction from the caller.
// to eventually destroy the object without further interaction from the
// caller.
virtual void Orphan() GRPC_ABSTRACT;
// Not copyable or movable.

@ -79,11 +79,11 @@ class RefCountedPtr {
bool operator==(const RefCountedPtr& other) const {
return value_ == other.value_;
}
bool operator==(T* other) const { return value_ == other; }
bool operator==(const T* other) const { return value_ == other; }
bool operator!=(const RefCountedPtr& other) const {
return value_ != other.value_;
}
bool operator!=(T* other) const { return value_ != other; }
bool operator!=(const T* other) const { return value_ != other; }
private:
T* value_ = nullptr;

Loading…
Cancel
Save