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

Function destroy

physx/source/common/src/CmPool.h:84–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 PX_INLINE void destroy()
85 {
86 // Run all destructors
87 for(PxU32 i=0;i<mSlabCount;i++)
88 {
89 PX_ASSERT(mSlabs);
90 T* slab = mSlabs[i];
91 for(PxU32 j=0;j<mEltsPerSlab;j++)
92 {
93 slab[j].~T();
94 }
95 }
96
97 //Deallocate
98 for(PxU32 i=0;i<mSlabCount;i++)
99 {
100 PX_FREE(mSlabs[i]);
101 mSlabs[i] = NULL;
102 }
103 mSlabCount = 0;
104
105 if(mFreeList)
106 PX_FREE(mFreeList);
107 mFreeList = NULL;
108 if(mSlabs)
109 {
110 PX_FREE(mSlabs);
111 mSlabs = NULL;
112 }
113 }
114
115 PxU32 preallocate(const PxU32 nbRequired, T** elements)
116 {

Callers 9

~ConsoleMethod · 0.85
~HashBaseMethod · 0.85
clearMethod · 0.85
ArrayMethod · 0.85
clearMethod · 0.85
resizeMethod · 0.85
PsArray.hFile · 0.85
recreateMethod · 0.85
~PoolListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected