---
name: "rtcReleaseDevice"
section: "3embree4"
platform: "linux"
package: "embree"
version: "4.4.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rtcReleaseDevice/3embree4"
---

# rtcReleaseDevice(3embree4)

### NAME

-

  ```
  rtcReleaseDevice - decrements the device reference count
  ```

### SYNOPSIS

-

  ```
  #include <embree4/rtcore.h>
  void rtcReleaseDevice(RTCDevice device);
  ```

### DESCRIPTION

Device objects are reference counted. The `rtcReleaseDevice` function decrements the reference count of the passed device object (`device` argument). When the reference count falls to 0, the device gets destroyed.

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.

### EXIT STATUS

On failure an error code is set that can be queried using `rtcGetDeviceError`.

### SEE ALSO

\[rtcNewDevice\], \[rtcRetainDevice\]
