Clean up iCodeConverter singleton on exit
This commit is contained in:
parent
8bb3669cf7
commit
7310422053
|
@ -111,6 +111,12 @@ iCodeConverter* iCodeConverter::GetInstance()
|
|||
return m_pInst;
|
||||
}
|
||||
|
||||
void iCodeConverter::Finit()
|
||||
{
|
||||
delete m_pInst;
|
||||
m_pInst = 0;
|
||||
}
|
||||
|
||||
iCodeConverter* iCodeConverter::CreateConverter()
|
||||
{
|
||||
cDebug d("iCodeConverter::CreateConverter()");
|
||||
|
|
|
@ -93,6 +93,8 @@ class iCodeConverter
|
|||
public:
|
||||
|
||||
static iCodeConverter* GetInstance(); // Singleton
|
||||
static void Finit();
|
||||
|
||||
|
||||
|
||||
/// Subclass Responsibilities
|
||||
|
|
|
@ -60,5 +60,8 @@ cCore::cCore()
|
|||
iCodeConverter::GetInstance();
|
||||
}
|
||||
|
||||
|
||||
cCore::~cCore()
|
||||
{
|
||||
iCodeConverter::Finit();
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ TSS_BeginPackage( cCore )
|
|||
public:
|
||||
|
||||
cCore();
|
||||
~cCore();
|
||||
|
||||
TSS_EndPackage( cCore )
|
||||
|
||||
|
|
Loading…
Reference in New Issue