Skip to content

IGpuTextureSource.RetainGpuHandle method

Adds a reference to the underlying GPU handle so its lifetime extends past this source’s disposal; returns false when the source does not support retaining (the default).

public bool RetainGpuHandle(IntPtr handle)

Required for safe borrowed zero-copy wrapping when the source’s lifetime is tighter than the consumer’s (for example a scratch surface rented per filter pass while the consumer’s command buffer has not yet committed). Must be paired with ReleaseGpuHandle.