- The garbage collector now has an opportunity to step each time individual
thinkers tick, not just once every game tick. This more closely follows the original Lua behavior. This change was made because, in cases of extremely large and frequent memory allocations, the collector may not run fast enough if it only has a chance to execute once per tick. SVN r1197 (trunk)
This commit is contained in:
parent
ab3363dc1e
commit
b77836d4cf
3 changed files with 13 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ extern int BotWTG;
|
|||
|
||||
IMPLEMENT_CLASS (DThinker)
|
||||
|
||||
static DThinker *NextToThink;
|
||||
DThinker *NextToThink;
|
||||
|
||||
FThinkerList DThinker::Thinkers[MAX_STATNUM+2];
|
||||
FThinkerList DThinker::FreshThinkers[MAX_STATNUM+1];
|
||||
|
|
@ -463,6 +463,7 @@ int DThinker::TickThinkers (FThinkerList *list, FThinkerList *dest)
|
|||
if (!(node->ObjectFlags & OF_EuthanizeMe))
|
||||
{ // Only tick thinkers not scheduled for destruction
|
||||
node->Tick ();
|
||||
GC::CheckGC();
|
||||
}
|
||||
node = NextToThink;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue