- fixed GC::FullGC not collecting everything anymore.

With the delayed handling of internal references of destroyed objects the function now returned without making sure that it really got everything.
Repeating until it cannot delete anything new anymore makes it work again as intended.
This commit is contained in:
Christoph Oelckers 2022-12-05 12:29:18 +01:00
parent f163c328d4
commit ff8863833a

View file

@ -550,6 +550,10 @@ void Step()
void FullGC()
{
bool ContinueCheck = true;
while (ContinueCheck)
{
ContinueCheck = false;
if (State <= GCS_Propagate)
{
// Reset sweep mark to sweep all elements (returning them to white)
@ -571,8 +575,10 @@ void FullGC()
{
SingleStep();
}
ContinueCheck |= HadToDestroy;
} while (HadToDestroy);
}
}
//==========================================================================
//