rtcRetainDevice(3)

✨ NAME ✨

rtcRetainDevice β€” increments the device reference count πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <embree4/rtcore.h>

void rtcRetainDevice(RTCDevice device);

πŸ’… DESCRIPTION πŸ’…

okay so device objects are reference counted, no cap. the rtcRetainDevice function increments the reference count of the device object you pass in β€” that's the device argument, bestie. this function, together with rtcReleaseDevice, lets you use the internal reference counting inside a C++ wrapper class to manage the ownership of the object. it's giving ownership-management realness ✨


😭 EXIT STATUS 😭

if it fails, an error code gets set, and you can query it with rtcGetDeviceError. so if something's acting up, go ask that function what's wrong πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

  • [rtcNewDevice]
  • [rtcReleaseDevice]

that's the whole vibe, bestie β€” source/version: Embree Ray Tracing Kernels 4; page: rtcRetainDevice(3); date: not listed on this footer, so we're signing off with sparkles 🫢✨

πŸ“¦ where this page comes from