class Release
Defined at line 1016 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/markers.h
###### On a [`fuchsia.sysmem2/BufferCollectionToken`] channel:
Normally a participant will convert a `BufferCollectionToken` into a
[`fuchsia.sysmem2/BufferCollection`], but a participant can instead send
`Release` via the token (and then close the channel immediately or
shortly later in response to server closing the server end), which
avoids causing buffer collection failure. Without a prior `Release`,
closing the `BufferCollectionToken` client end will cause buffer
collection failure.
###### On a [`fuchsia.sysmem2/BufferCollection`] channel:
By default the server handles unexpected closure of a
[`fuchsia.sysmem2/BufferCollection`] client end (without `Release`
first) by failing the buffer collection. Partly this is to expedite
closing VMO handles to reclaim memory when any participant fails. If a
participant would like to cleanly close a `BufferCollection` without
causing buffer collection failure, the participant can send `Release`
before closing the `BufferCollection` client end. The `Release` can
occur before or after `SetConstraints`. If before `SetConstraints`, the
buffer collection won't require constraints from this node in order to
allocate. If after `SetConstraints`, the constraints are retained and
aggregated, despite the lack of `BufferCollection` connection at the
time of constraints aggregation.
###### On a [`fuchsia.sysmem2/BufferCollectionTokenGroup`] channel:
By default, unexpected closure of a `BufferCollectionTokenGroup` client
end (without `Release` first) will trigger failure of the buffer
collection. To close a `BufferCollectionTokenGroup` channel without
failing the buffer collection, ensure that AllChildrenPresent() has been
sent, and send `Release` before closing the `BufferCollectionTokenGroup`
client end.
If `Release` occurs before
[`fuchsia.sysmem2/BufferCollectionTokenGroup.AllChildrenPresent], the
buffer collection will fail (triggered by reception of `Release` without
prior `AllChildrenPresent`). This is intentionally not analogous to how
[`fuchsia.sysmem2/BufferCollection.Release`] without
[`fuchsia.sysmem2/BufferCollection.SetConstraints`] first doesn't cause
buffer collection failure. For a `BufferCollectionTokenGroup`, clean
close requires `AllChildrenPresent` (if not already sent), then
`Release`, then close client end.
If `Release` occurs after `AllChildrenPresent`, the children and all
their constraints remain intact (just as they would if the
`BufferCollectionTokenGroup` channel had remained open), and the client
end close doesn't trigger buffer collection failure.
###### On all [`fuchsia.sysmem2/Node`] channels (any of the above):
For brevity, the per-channel-protocol paragraphs above ignore the
separate failure domain created by
[`fuchsia.sysmem2/BufferCollectionToken.SetDispensable`] or
[`fuchsia.sysmem2/BufferCollection.AttachToken`]. When a client end
unexpectedly closes (without `Release` first) and that client end is
under a failure domain, instead of failing the whole buffer collection,
the failure domain is failed, but the buffer collection itself is
isolated from failure of the failure domain. Such failure domains can be
nested, in which case only the inner-most failure domain in which the
`Node` resides fails.
Public Members
static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal