MCPcopy Create free account
hub / github.com/RenderKit/oidn / releaseObject

Function releaseObject

api/api.cpp:112–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111 template<typename T>
112 oidn_inline void releaseObject(T* obj)
113 {
114 if (obj == nullptr || obj->decRefKeep() == 0)
115 {
116 OIDN_TRY
117 checkHandle(obj);
118 OIDN_LOCK_DEVICE(obj);
119 obj->getDevice()->wait(); // wait for all async operations to complete
120 obj->destroy();
121 obj = nullptr;
122 OIDN_CATCH_DEVICE(obj)
123 }
124 }
125
126 template<>
127 oidn_inline void releaseObject(Device* device)

Callers 4

oidnReleaseDeviceFunction · 0.85
oidnReleaseBufferFunction · 0.85
oidnReleaseSemaphoreFunction · 0.85
oidnReleaseFilterFunction · 0.85

Calls 4

waitMethod · 0.45
getDeviceMethod · 0.45
enterMethod · 0.45
leaveMethod · 0.45

Tested by

no test coverage detected