mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
单例对象销毁时的检查,修正由此错误的销毁单例对象的bug
This commit is contained in:
@@ -35,9 +35,12 @@ namespace GameBase
|
||||
}
|
||||
|
||||
protected virtual void OnDestroy()
|
||||
{
|
||||
if (this == _instance)
|
||||
{
|
||||
Release();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断对象是否有效
|
||||
|
Reference in New Issue
Block a user