Allow to link the DX11ClothDemo against the 64bit DirectX SDK for x64 builds

Fix memory leaks in btBulletFile and btParallelConstraintSolver (and added some additional profile timers)
This commit is contained in:
erwin.coumans committed 2010-08-19 20:03:23 +00:00
1 parent f89ddcc86e
commit 32433aa8b3
5 files changed
+31 -6

No files matched your search

@@ -46,7 +46,8 @@ using namespace bParse;
btBulletFile::btBulletFile()
:bFile("", "BULLET ")
{
mMemoryDNA = new bDNA();
mMemoryDNA = new bDNA(); //this memory gets released in the bFile::~bFile destructor,@todo not consistent with the rule 'who allocates it, has to deallocate it"
m_DnaCopy = 0;
@@ -97,6 +98,15 @@ btBulletFile::~btBulletFile()
{
if (m_DnaCopy)
btAlignedFree(m_DnaCopy);
while (m_dataBlocks.size())
{
char* dataBlock = m_dataBlocks[m_dataBlocks.size()-1];
delete[] dataBlock;
m_dataBlocks.pop_back();
}
}
@@ -211,7 +221,8 @@ void btBulletFile::parseData()
void btBulletFile::addDataBlock(char* dataBlock)
{
//mMain->addDatablock(dataBlock);
m_dataBlocks.push_back(dataBlock);
}
@@ -50,6 +50,7 @@ namespace bParse {
btAlignedObjectArray<bStructHandle*> m_triangleInfoMaps;
btAlignedObjectArray<char*> m_dataBlocks;
btBulletFile();
btBulletFile(const char* fileName);