diff options
| author | Sheikh Dawood Abdul Ajees <[email protected]> | 2018-01-26 19:43:03 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <[email protected]> | 2018-01-26 19:43:03 -0600 |
| commit | b6db9a56548cd1c41bee309e721d76ea2c9320da (patch) | |
| tree | 1f0436b187db50c21e576b4f4d491530113c91bc /PhysX_3.4/Source/PhysXCooking/src/mesh/RTreeCooking.cpp | |
| parent | PhysX 3.4.1, APEX 1.4.1 Release @23307153 (diff) | |
| download | physx-3.4-b6db9a56548cd1c41bee309e721d76ea2c9320da.tar.xz physx-3.4-b6db9a56548cd1c41bee309e721d76ea2c9320da.zip | |
PhysX 3.4, APEX 1.4 patch release @23472123
Diffstat (limited to 'PhysX_3.4/Source/PhysXCooking/src/mesh/RTreeCooking.cpp')
| -rw-r--r-- | PhysX_3.4/Source/PhysXCooking/src/mesh/RTreeCooking.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/PhysX_3.4/Source/PhysXCooking/src/mesh/RTreeCooking.cpp b/PhysX_3.4/Source/PhysXCooking/src/mesh/RTreeCooking.cpp index db225a5a..005df847 100644 --- a/PhysX_3.4/Source/PhysXCooking/src/mesh/RTreeCooking.cpp +++ b/PhysX_3.4/Source/PhysXCooking/src/mesh/RTreeCooking.cpp @@ -359,19 +359,19 @@ struct SubSortSAH xOrder(xOrder_), yOrder(yOrder_), zOrder(zOrder_), xRanks(xRanks_), yRanks(yRanks_), zRanks(zRanks_), nbTotalBounds(numBounds) { - metricL = new PxF32[numBounds]; - metricR = new PxF32[numBounds]; - tempPermute = new PxU32[numBounds*2+1]; - tempRanks = new PxU32[numBounds]; + metricL = reinterpret_cast<PxF32*>(PX_ALLOC(sizeof(PxF32)*numBounds, PX_DEBUG_EXP("metricL"))); + metricR = reinterpret_cast<PxF32*>(PX_ALLOC(sizeof(PxF32)*numBounds, PX_DEBUG_EXP("metricR"))); + tempPermute = reinterpret_cast<PxU32*>(PX_ALLOC(sizeof(PxU32)*(numBounds*2+1), PX_DEBUG_EXP("tempPermute"))); + tempRanks = reinterpret_cast<PxU32*>(PX_ALLOC(sizeof(PxU32)*numBounds, PX_DEBUG_EXP("tempRanks"))); iTradeOff = PxMin<PxU32>( PxU32(PxMax<PxReal>(0.0f, sizePerfTradeOff01)*NTRADEOFF), NTRADEOFF-1 ); } ~SubSortSAH() // release temporarily used memory { - delete [] metricL; metricL = NULL; - delete [] metricR; metricR = NULL; - delete [] tempPermute; tempPermute = NULL; - delete [] tempRanks; tempRanks = NULL; + PX_FREE_AND_RESET(metricL); + PX_FREE_AND_RESET(metricR); + PX_FREE_AND_RESET(tempPermute); + PX_FREE_AND_RESET(tempRanks); } //////////////////////////////////////////////////////////////////// |