1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Improved performance with lots of raw leaks displayed

This commit is contained in:
Brian Fiete 2021-12-06 12:35:13 -08:00
parent 6cf0152d99
commit 09bf85ad0e
3 changed files with 48 additions and 16 deletions

View file

@ -421,8 +421,13 @@ void BFGC::RawShutdown()
gDbgErrorString = errorStr;
gDbgErrorString += "\n";
int passLeakCount = 0;
for (auto& rawLeak : mSweepInfo.mRawLeaks)
{
if (passLeakCount == 20000) // Only display so many...
break;
Beefy::String typeName;
if (rawLeak.mRawAllocData->mType != NULL)
typeName = rawLeak.mRawAllocData->mType->GetFullName() + "*";
@ -451,6 +456,8 @@ void BFGC::RawShutdown()
if (gDbgErrorString.length() < 256)
gDbgErrorString += StrFormat(" %s\n", leakStr.c_str());
passLeakCount++;
}
BF_ASSERT(mSweepInfo.mLeakCount > 0);