.\" Automatically generated by Pandoc 2.5
.\"
.TH "rtcReleaseDevice" "3" "" "" "Embree Ray Tracing Kernels 3"
.hy
.SS NAME
.IP
.nf
\f[C]
rtcReleaseDevice \- decrements the device reference count
\f[R]
.fi
.SS SYNOPSIS
.IP
.nf
\f[C]
#include <embree3/rtcore.h>

void rtcReleaseDevice(RTCDevice device);
\f[R]
.fi
.SS DESCRIPTION
.PP
Device objects are reference counted.
The \f[C]rtcReleaseDevice\f[R] function decrements the reference count
of the passed device object (\f[C]device\f[R] argument).
When the reference count falls to 0, the device gets destroyed.
.PP
All objects created from the device (like scenes, geometries, etc.) hold
a reference to the device, thus the device will not get destroyed unless
these objects are destroyed first.
.SS EXIT STATUS
.PP
On failure an error code is set that can be queried using
\f[C]rtcGetDeviceError\f[R].
.SS SEE ALSO
.PP
[rtcNewDevice], [rtcRetainDevice]
