diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -296,6 +296,11 @@ void AIInstance::GameLoop() } } +void AIInstance::CollectGarbage() +{ + if (this->is_started && !this->is_dead) this->engine->CollectGarbage(); +} + /* static */ void AIInstance::DoCommandReturn(AIInstance *instance) { instance->engine->InsertResult(AIObject::GetLastCommandRes());