diff --git a/core/Base/GC.cpp b/core/Base/GC.cpp index b1b66989..3b433f20 100644 --- a/core/Base/GC.cpp +++ b/core/Base/GC.cpp @@ -61,7 +61,7 @@ e2d::GC::~GC() } -void e2d::GC::update() +void e2d::GC::flush() { if (!_instance._notifyed) return; diff --git a/core/Base/Game.cpp b/core/Base/Game.cpp index 76a14f0d..9e10641b 100644 --- a/core/Base/Game.cpp +++ b/core/Base/Game.cpp @@ -77,7 +77,7 @@ void e2d::Game::start(bool cleanup) actionManager->update(); // 更新动作管理器 sceneManager->update(); // 更新场景内容 renderer->render(); // 渲染游戏画面 - GC::update(); // 刷新内存池 + GC::flush(); // 刷新内存池 Time::__updateLast(); // 刷新时间信息 } @@ -87,8 +87,6 @@ void e2d::Game::start(bool cleanup) } } - _ended = true; - if (cleanup) { Game::cleanup(); diff --git a/core/e2dbase.h b/core/e2dbase.h index 12f652a5..ffe95c88 100644 --- a/core/e2dbase.h +++ b/core/e2dbase.h @@ -549,10 +549,10 @@ public: } } - // 更新垃圾回收器状态 - static void update(); + // 刷新内存池 + static void flush(); - // 清空所有对象 + // 回收内存池中的所有对象 static void clear(); private: