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

Method removeReference

physx/source/common/src/CmTask.h:137–151  ·  view source on GitHub ↗

Swap mDependents with mReferencesToRemove when refcount goes to 0. */

Source from the content-addressed store, hash-verified

135 Swap mDependents with mReferencesToRemove when refcount goes to 0.
136 */
137 virtual void removeReference()
138 {
139 shdfnd::Mutex::ScopedLock lock(mMutex);
140 if (!physx::shdfnd::atomicDecrement(&mRefCount))
141 {
142 // prevents access to mReferencesToRemove until release
143 physx::shdfnd::atomicIncrement(&mRefCount);
144 mNotifySubmission = false;
145 PX_ASSERT(mReferencesToRemove.empty());
146 for (PxU32 i = 0; i < mDependents.size(); i++)
147 mReferencesToRemove.pushBack(mDependents[i]);
148 mDependents.clear();
149 mTm->getCpuDispatcher()->submitTask(*this);
150 }
151 }
152
153 /**
154 \brief Increases reference count

Callers 15

stepPhysicsFunction · 0.45
concurrentVehicleUpdatesFunction · 0.45
startNextSubstepFunction · 0.45
onSubstepStartMethod · 0.45
renderDoneMethod · 0.45
substepDoneMethod · 0.45
substepMethod · 0.45
simulateMethod · 0.45
advanceMethod · 0.45

Calls 8

submitTaskMethod · 0.80
atomicDecrementFunction · 0.50
atomicIncrementFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
pushBackMethod · 0.45
clearMethod · 0.45
getCpuDispatcherMethod · 0.45

Tested by

no test coverage detected