template <bool EnableAdoptionValidator>

class RefCountedBase

Defined at line 24 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h

Adoption validation will help to catch:

- Double-adoptions

- AddRef/Release without adopting first

- Re-wrapping raw pointers to destroyed objects

It also provides some limited defense against

- Wrapping bad pointers

Protected Members

atomic ref_count_
static const int32_t kPreAdoptSentinel

Protected Methods

void RefCountedBase<EnableAdoptionValidator> ()

Defined at line 26 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h

void ~RefCountedBase<EnableAdoptionValidator> ()

Defined at line 28 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h

void AddRef ()

Defined at line 38 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h

bool Release ()

Returns true if the object should self-delete.

A call to Release() that returns true must synchronize-with the previous

(in the modification order of ref_count_) call to Release(). See below for

details.

Defined at line 66 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h

bool IsLastReference ()

Defined at line 222 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h

void Adopt ()

Defined at line 226 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h

int ref_count_debug ()

Current ref count. Only to be used for debugging purposes.

Defined at line 244 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_internal.h