MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / decrReference

Method decrReference

physx/source/task/src/TaskManager.cpp:178–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void PxTaskMgr::decrReference(PxLightCpuTask& lighttask)
179{
180 /* This does not need a lock! */
181 if (!shdfnd::atomicDecrement(&lighttask.mRefCount))
182 {
183 PX_ASSERT(mCpuDispatcher);
184 if (mCpuDispatcher)
185 {
186 mCpuDispatcher->submitTask(lighttask);
187 }
188 else
189 {
190 lighttask.release();
191 }
192 }
193}
194
195void PxTaskMgr::addReference(PxLightCpuTask& lighttask)
196{

Callers 2

removeReferenceMethod · 0.80
removeReferenceMethod · 0.80

Calls 3

submitTaskMethod · 0.80
atomicDecrementFunction · 0.50
releaseMethod · 0.45

Tested by

no test coverage detected