ndk::SharedRefBase

#include <binder_interface_utils.h>

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

Summary

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

Inheritance

Direct Known Subclasses:ndk::ICInterface

Constructors and Destructors

SharedRefBase()
~SharedRefBase()

Public functions

ref()
std::shared_ptr< SharedRefBase >
A shared_ptr must be held to this object when this is called.
ref()
std::shared_ptr< CHILD >
Convenience method for a ref (see above) which automatically casts to the desired child type.

Public static functions

make(Args &&... args)
std::shared_ptr< T >
Convenience method for making an object directly with a reference.
operator delete(void *p)
void

Public functions

SharedRefBase

 SharedRefBase()

ref

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.

ref

std::shared_ptr< CHILD > ref()

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

~SharedRefBase

virtual  ~SharedRefBase()

Public static functions

make

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

Convenience method for making an object directly with a reference.

operator delete

void operator delete(
  void *p
)