mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-26 00:36:17 +00:00
Fixed: Release CCurrentCoTask singleton
This commit is contained in:
parent
ffdbf0be8c
commit
9bfa8f1049
3 changed files with 19 additions and 1 deletions
|
@ -201,7 +201,9 @@ namespace NLMISC
|
||||||
*/
|
*/
|
||||||
void sleep(uint milliseconds);
|
void sleep(uint milliseconds);
|
||||||
|
|
||||||
|
/** Release internal instance.
|
||||||
|
*/
|
||||||
|
static void releaseInstance();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,16 @@ namespace NLMISC
|
||||||
return _ThreadMainFiber.getPointer();
|
return _ThreadMainFiber.getPointer();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void releaseInstance()
|
||||||
|
{
|
||||||
|
if (_Instance)
|
||||||
|
{
|
||||||
|
NLMISC::INelContext::getInstance().releaseSingletonPointer("CCurrentCoTask", _Instance);
|
||||||
|
delete _Instance;
|
||||||
|
_Instance = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
NLMISC_SAFE_SINGLETON_IMPL(CCurrentCoTask);
|
NLMISC_SAFE_SINGLETON_IMPL(CCurrentCoTask);
|
||||||
|
@ -560,5 +570,10 @@ namespace NLMISC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCoTask::releaseInstance()
|
||||||
|
{
|
||||||
|
CCurrentCoTask::releaseInstance();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NLMISC
|
} // namespace NLMISC
|
||||||
|
|
||||||
|
|
|
@ -669,6 +669,7 @@ void release()
|
||||||
CWidgetManager::release();
|
CWidgetManager::release();
|
||||||
CViewRenderer::release();
|
CViewRenderer::release();
|
||||||
CIXml::releaseLibXml();
|
CIXml::releaseLibXml();
|
||||||
|
CCoTask::releaseInstance();
|
||||||
|
|
||||||
#if FINAL_VERSION
|
#if FINAL_VERSION
|
||||||
// openURL ("http://www.ryzomcore.org/exit/");
|
// openURL ("http://www.ryzomcore.org/exit/");
|
||||||
|
|
Loading…
Reference in a new issue