修复App::destory函数造成内存泄漏的bug
This commit is contained in:
parent
4462834c3c
commit
a7e82b6801
|
|
@ -393,7 +393,8 @@ void App::free()
|
|||
void App::destory()
|
||||
{
|
||||
// 释放所有内存
|
||||
free();
|
||||
s_pInstance->free();
|
||||
// 实例指针置空
|
||||
delete s_pInstance;
|
||||
s_pInstance = nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,8 +131,6 @@ public:
|
|||
int run();
|
||||
// 释放所有内存资源
|
||||
void free();
|
||||
// 销毁该对象
|
||||
void destory();
|
||||
|
||||
// 获取程序实例
|
||||
static App * get();
|
||||
|
|
@ -178,6 +176,8 @@ public:
|
|||
static void reset();
|
||||
// 获取当前场景
|
||||
static Scene * getCurrentScene();
|
||||
// 销毁该对象
|
||||
static void destory();
|
||||
|
||||
protected:
|
||||
TString m_sTitle;
|
||||
|
|
|
|||
Loading…
Reference in New Issue