mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
clear utf16 cache
this stops the unicode global cache from showing in the memleak output
This commit is contained in:
parent
8926d1c32b
commit
d8315267e8
4 changed files with 12 additions and 2 deletions
|
|
@ -289,6 +289,11 @@ UTF8* createUTF8string( const UTF16* unistring)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UTF16ClearCache()
|
||||||
|
{
|
||||||
|
sgUTF16Cache.clear();
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@ UTF16* createUTF16string( const UTF8 *unistring);
|
||||||
|
|
||||||
UTF8* createUTF8string( const UTF16 *unistring);
|
UTF8* createUTF8string( const UTF16 *unistring);
|
||||||
|
|
||||||
|
void UTF16ClearCache();
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/// Functions that convert buffers of unicode code points, into a provided buffer.
|
/// Functions that convert buffers of unicode code points, into a provided buffer.
|
||||||
/// - These functions are useful for working on existing buffers.
|
/// - These functions are useful for working on existing buffers.
|
||||||
|
|
@ -138,4 +140,4 @@ const UTF8* getNthCodepoint(const UTF8 *unistring, const U32 n);
|
||||||
bool chompUTF8BOM( const char *inString, char **outStringPtr );
|
bool chompUTF8BOM( const char *inString, char **outStringPtr );
|
||||||
bool isValidUTF8BOM( U8 bom[4] );
|
bool isValidUTF8BOM( U8 bom[4] );
|
||||||
|
|
||||||
#endif // _UNICODE_H_
|
#endif // _UNICODE_H_
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ S32 TorqueMain(S32 argc, const char **argv)
|
||||||
// argv = argvFake;
|
// argv = argvFake;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
|
#if defined( TORQUE_DEBUG ) && !defined(TORQUE_DISABLE_MEMORY_MANAGER)
|
||||||
Memory::init();
|
Memory::init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -257,6 +257,7 @@ S32 TorqueMain(S32 argc, const char **argv)
|
||||||
Platform::restartInstance();
|
Platform::restartInstance();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined( TORQUE_DEBUG ) && !defined( TORQUE_DISABLE_MEMORY_MANAGER )
|
#if defined( TORQUE_DEBUG ) && !defined( TORQUE_DISABLE_MEMORY_MANAGER )
|
||||||
Memory::shutdown();
|
Memory::shutdown();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -317,6 +317,8 @@ void Platform::shutdown()
|
||||||
GFXDevice::destroy();
|
GFXDevice::destroy();
|
||||||
|
|
||||||
WinConsole::destroy();
|
WinConsole::destroy();
|
||||||
|
|
||||||
|
UTF16ClearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern bool LinkConsoleFunctions;
|
extern bool LinkConsoleFunctions;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue