class Reffable

Defined at line 27 of file ../../src/ui/lib/escher/base/reffable.h

Reffable is a threadsafe ref-counted base class that is suitable for use with fxl::RefPtr.

It provides a virtual OnZeroRefCount() method that subclasses can override to avoid immediate

destruction when their ref-count becomes zero.

Use this class similarly to fxl::RefCountedThreadSafe. For example, instead

of:

class Foo : public RefCountedThreadSafe

<Foo

> { ...

simply say:

class Foo : public Reffable { ...

Public Methods

void ~Reffable ()

Defined at line 11 of file ../../src/ui/lib/escher/base/reffable.cc

void Reffable ()

Defined at line 29 of file ../../src/ui/lib/escher/base/reffable.h

uint32_t ref_count ()

Return the number of references to this object.

Defined at line 33 of file ../../src/ui/lib/escher/base/reffable.h

Protected Methods

bool OnZeroRefCount ()

Return true if the object should be destroyed immediately, or false if its

destruction should be deferred. Subclass that override this method to

return false are responsible for ensuring that the object is eventually

destroyed.

Defined at line 40 of file ../../src/ui/lib/escher/base/reffable.h

Friends

template <typename T>
class RefPtr