class SharedRefBase

Defined at line 62 of file ../../third_party/android/platform/frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h

Binder analog to using std::shared_ptr for an internally held refcount.

ref must be called at least one time during the lifetime of this object. The recommended way to

construct this object is with SharedRefBase::make.

If you need a "this" shared reference analogous to shared_from_this, use this->ref().

Public Methods

void SharedRefBase ()

Defined at line 64 of file ../../third_party/android/platform/frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h

void ~SharedRefBase ()

Defined at line 65 of file ../../third_party/android/platform/frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h

std::shared_ptr<SharedRefBase> ref ()

A shared_ptr must be held to this object when this is called. This must be called once during

the lifetime of this object.

Defined at line 81 of file ../../third_party/android/platform/frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h

template <typename CHILD>
std::shared_ptr<CHILD> ref ()

Convenience method for a ref (see above) which automatically casts to the desired child type.

Defined at line 93 of file ../../third_party/android/platform/frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h

template <class T, class... Args>
std::shared_ptr<T> make (Args &&... args)

Convenience method for making an object directly with a reference.

Defined at line 101 of file ../../third_party/android/platform/frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h

void operator delete (void * p)

Defined at line 110 of file ../../third_party/android/platform/frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h