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
|