MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / ~NpWriteCheck

Method ~NpWriteCheck

physx/source/physx/src/NpWriteCheck.cpp:76–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75
76NpWriteCheck::~NpWriteCheck()
77{
78 if (mScene)
79 {
80 // By checking if the NpScene::mConcurrentErrorCount has been incremented
81 // we can detect if an erroneous read/write was performed during
82 // this objects lifetime. In this case we also print this function's
83 // details so that the user can see which two API calls overlapped
84 if (mScene->getReadWriteErrorCount() != mErrorCount && !(mScene->getScene().getFlags() & PxSceneFlag::eREQUIRE_RW_LOCK))
85 {
86 Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__,
87 "Leaving %s on thread %d, an overlapping API read or write by another thread was detected.", mName, PxU32(Ps::Thread::getId()));
88 }
89
90 mScene->stopWrite(mAllowReentry);
91 }
92}

Callers

nothing calls this directly

Calls 4

errorMethod · 0.80
stopWriteMethod · 0.80
getFlagsMethod · 0.45
getSceneMethod · 0.45

Tested by

no test coverage detected