Commit 57ed369f authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

memory leak

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59161 954022d7-b5bf-4e40-9824-e11837661b57
parent 5f5d1cad
...@@ -1480,6 +1480,9 @@ namespace OOX ...@@ -1480,6 +1480,9 @@ namespace OOX
} }
virtual ~CColorTransform() virtual ~CColorTransform()
{ {
for ( unsigned int nIndex = 0; nIndex < m_arrTransform.size(); nIndex++ )
delete m_arrTransform[nIndex];
m_arrTransform.clear();
} }
public: public:
......
...@@ -284,8 +284,7 @@ namespace XmlUtils ...@@ -284,8 +284,7 @@ namespace XmlUtils
} }
virtual ~CXmlLiteReader() virtual ~CXmlLiteReader()
{ {
if (NULL != m_pStream) Clear();
delete []m_pStream;
} }
xmlTextReaderPtr getNativeReader() { return reader; } xmlTextReaderPtr getNativeReader() { return reader; }
...@@ -294,6 +293,7 @@ namespace XmlUtils ...@@ -294,6 +293,7 @@ namespace XmlUtils
inline void Clear() inline void Clear()
{ {
RELEASEMEM(reader);
if (NULL != m_pStream) if (NULL != m_pStream)
delete []m_pStream; delete []m_pStream;
m_pStream = NULL; m_pStream = NULL;
...@@ -461,7 +461,7 @@ namespace XmlUtils ...@@ -461,7 +461,7 @@ namespace XmlUtils
return L""; return L"";
m_sTemp = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pName, (LONG)strlen((const char*)pName)); m_sTemp = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pName, (LONG)strlen((const char*)pName));
delete [] pName; free(pName);
return m_sTemp.c_str(); return m_sTemp.c_str();
} }
inline const char* GetNameA() inline const char* GetNameA()
...@@ -475,7 +475,7 @@ namespace XmlUtils ...@@ -475,7 +475,7 @@ namespace XmlUtils
//return std::string((const char*)pName); //return std::string((const char*)pName);
m_sTempA = (const char*)pName; m_sTempA = (const char*)pName;
delete [] pName; free(pName);
return m_sTempA.c_str(); return m_sTempA.c_str();
} }
inline int GetDepth() inline int GetDepth()
...@@ -506,7 +506,7 @@ namespace XmlUtils ...@@ -506,7 +506,7 @@ namespace XmlUtils
return L""; return L"";
m_sTemp = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pValue, (LONG)strlen((const char*)pValue)); m_sTemp = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pValue, (LONG)strlen((const char*)pValue));
delete [] pValue; free(pValue);
return m_sTemp.c_str(); return m_sTemp.c_str();
} }
inline const char* GetTextA() inline const char* GetTextA()
...@@ -519,7 +519,7 @@ namespace XmlUtils ...@@ -519,7 +519,7 @@ namespace XmlUtils
return ""; return "";
m_sTempA = (const char*)pValue; m_sTempA = (const char*)pValue;
delete [] pValue; free(pValue);
return m_sTempA.c_str(); return m_sTempA.c_str();
} }
......
...@@ -57,7 +57,7 @@ CFontSelectFormat::~CFontSelectFormat() ...@@ -57,7 +57,7 @@ CFontSelectFormat::~CFontSelectFormat()
RELEASEOBJECT(bFixedWidth); RELEASEOBJECT(bFixedWidth);
RELEASEOBJECT(pPanose); RELEASEARRAYOBJECTS(pPanose);
RELEASEOBJECT(ulRange1); RELEASEOBJECT(ulRange1);
RELEASEOBJECT(ulRange2); RELEASEOBJECT(ulRange2);
......
...@@ -7,6 +7,7 @@ CFontStream::CFontStream() ...@@ -7,6 +7,7 @@ CFontStream::CFontStream()
{ {
m_pData = NULL; m_pData = NULL;
m_lSize = 0; m_lSize = 0;
m_lRef = 0;
} }
CFontStream::~CFontStream() CFontStream::~CFontStream()
{ {
......
...@@ -23,7 +23,7 @@ TGlyphBitmap::~TGlyphBitmap() ...@@ -23,7 +23,7 @@ TGlyphBitmap::~TGlyphBitmap()
{ {
if (bFreeData && pData != NULL) if (bFreeData && pData != NULL)
{ {
delete []pData; free(pData);
pData = NULL; pData = NULL;
} }
} }
......
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