class WeakStubController
Defined at line 24 of file ../../sdk/lib/fidl/hlcpp/include/lib/fidl/cpp/internal/weak_stub_controller.h
A weak reference to a |StubController|.
Used to link a |PendingResponse| object with a |StubController|. When the
|StubController| is destroyed (or unbound from the underling channel), the
weak reference is invalidated, preventing outstanding |PendingResponse|
objects from referencing the |StubController|.
Public Methods
void WeakStubController (StubController * controller)
Creates a weak reference to a |StubController|.
The created |WeakStubController| has a reference count of one, which means
the creator is responsible for calling |Release| exactly once.
Defined at line 10 of file ../../sdk/lib/fidl/hlcpp/internal/weak_stub_controller.cc
void AddRef ()
Increment the refernence count for this object.
Each call to this method imposes a requirement to eventually call |Release|
exactly once.
Defined at line 27 of file ../../sdk/lib/fidl/hlcpp/internal/weak_stub_controller.cc
void Release ()
Decrements the reference count for this object.
When the reference count reaches zero, the object is destroyed.
Defined at line 32 of file ../../sdk/lib/fidl/hlcpp/internal/weak_stub_controller.cc
void Invalidate ()
Break the connection between this object and the |StubController|.
After calling this method, |controller()| will return nullptr.
Cannot be called concurrently with AddRef or Release.
Defined at line 40 of file ../../sdk/lib/fidl/hlcpp/internal/weak_stub_controller.cc
StubController * controller ()
The |StubController| to which this weak reference refers.
After the weak reference has been invalidated, this method returns nullptr.
Cannot be called concurrently with AddRef or Release.
Defined at line 49 of file ../../sdk/lib/fidl/hlcpp/internal/weak_stub_controller.cc