Commit cd8b9de3 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

free glyphs bitmap data in ClearCache

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59154 954022d7-b5bf-4e40-9824-e11837661b57
parent 0a93dc79
......@@ -296,11 +296,11 @@ void CFontFile::SetSizeAndDpi(double dSize, UINT unHorDpi, UINT unVerDpi)
void CFontFile::ClearCache()
{
// TODO: total memory
ClearCacheNoAttack();
ClearCacheNoAttack(true);
}
void CFontFile::ClearCacheNoAttack()
void CFontFile::ClearCacheNoAttack(bool bIsFree)
{
m_oCacheSizes.Clear();
m_oCacheSizes.Clear(bIsFree);
::memset( m_arrCacheSizesIndexs, 0xFF, FONT_CACHE_SIZES_INDEXES_SIZE_2 );
}
......
......@@ -61,8 +61,17 @@ public:
{
m_arrSizes.RemoveAll();
}
inline void Clear()
inline void Clear(bool bIsFree = false)
{
if (bIsFree)
{
int nCount = m_arrSizes.GetCount();
for (int i = 0; i < nCount; ++i)
{
m_arrSizes[i].oBitmap.bFreeData = TRUE;
}
}
m_arrSizes.RemoveAll();
}
......@@ -183,7 +192,7 @@ public:
void SetSizeAndDpi(double dSize, UINT unHorDpi, UINT unVerDpi);
void ClearCache();
void ClearCacheNoAttack();
void ClearCacheNoAttack(bool bIsFree = false);
void Destroy();
bool SetTextMatrix(const double& fA, const double& fB, const double& fC, const double fD, double fE, double fF);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment