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

Method ~NpReadCheck

physx/source/physx/src/NpReadCheck.cpp:67–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66
67NpReadCheck::~NpReadCheck()
68{
69 if (mScene)
70 {
71 // By checking if the NpScene::mConcurrentErrorCount has been incremented
72 // we can detect if an erroneous read/write was performed during
73 // this objects lifetime. In this case we also print this function's
74 // details so that the user can see which two API calls overlapped
75 if (mScene->getReadWriteErrorCount() != mErrorCount && !(mScene->getScene().getFlags() & PxSceneFlag::eREQUIRE_RW_LOCK))
76 {
77 Ps::getFoundation().error(PxErrorCode::eINVALID_OPERATION, __FILE__, __LINE__,
78 "Leaving %s on thread %d, an API overlapping write on another thread was detected.", mName, PxU32(Ps::Thread::getId()));
79 }
80
81 mScene->stopRead();
82 }
83}

Callers

nothing calls this directly

Calls 4

errorMethod · 0.80
stopReadMethod · 0.80
getFlagsMethod · 0.45
getSceneMethod · 0.45

Tested by

no test coverage detected