C Specification
The xrDestroySpatialPersistenceContextEXT function is defined as:
// Provided by XR_EXT_spatial_persistence
XrResult xrDestroySpatialPersistenceContextEXT(
XrSpatialPersistenceContextEXT persistenceContext);
Parameters
Description
The application can use xrDestroySpatialPersistenceContextEXT to
release the persistenceContext handle when it is finished with spatial
persistence tasks.
The runtime must not destroy the underlying resources for
persistenceContext when xrDestroySpatialPersistenceContextEXT is
called if there are any valid XrSpatialContextEXT handles that
persistenceContext was linked to via
XrSpatialContextPersistenceConfigEXT.
This is because the persistence context’s resources are still used by the
spatial context for discovering persisted entities.
Destroying the persistence context handle in such a situation only removes
the application’s access to these resources.
The resources for a destroyed XrSpatialPersistenceContextEXT must be freed when all the XrSpatialContextEXT handles the persistence context was linked to are destroyed.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.