MCPcopy Create free account
hub / github.com/RenderKit/embree / RTCDeviceRef

Class RTCDeviceRef

tutorials/verify/rtcore_helpers.h:26–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 }
25
26 struct RTCDeviceRef
27 {
28 public:
29 mutable RTCDevice device;
30
31 RTCDeviceRef ()
32 : device(nullptr) {}
33
34 RTCDeviceRef (nullptr_t)
35 : device(nullptr) {}
36
37 RTCDeviceRef (RTCDevice device)
38 : device(device) {}
39
40 RTCDeviceRef (const RTCDeviceRef& in)
41 {
42 device = in.device;
43 in.device = nullptr;
44 }
45
46 ~RTCDeviceRef ()
47 {
48 if (device == nullptr) return;
49 rtcReleaseDevice(device);
50 }
51
52 operator RTCDevice () const { return device; }
53
54 RTCDeviceRef& operator= (RTCDevice in)
55 {
56 device = in;
57 return *this;
58 }
59
60 RTCDeviceRef& operator= (const RTCDeviceRef& in)
61 {
62 if (in.device != device && device)
63 rtcReleaseDevice(device);
64 device = in.device;
65 in.device = nullptr;
66 return *this;
67 }
68
69 RTCDeviceRef& operator= (nullptr_t)
70 {
71 if (device) rtcReleaseDevice(device);
72 device = nullptr;
73 return *this;
74 }
75 };
76
77 struct RTCSceneRef
78 {

Callers

nothing calls this directly

Calls 1

rtcReleaseDeviceFunction · 0.85

Tested by

no test coverage detected