I found a memory leak in my code, but i can not figure out how to fix it.
When i loop like this:
for (;;)
{
physx::PxMaterial *pMaterial = pPhysic_physicsSDK->createMaterial(0.5f, 0.5f, 0.5f);
pMaterial->release();
}
I have memory overflow. Memory are not releasing. How to release it right?
I tried to delete it "delete pMaterial
", but no delete access is granted.