NOT PART OF BUILD. Fix for memory leak in simple array
git-svn-id: svn://10.0.0.236/trunk@106730 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -413,6 +413,7 @@ HRESULT nsPluginHostCtrl::CleanupPluginList()
|
||||
free(pI->szPluginPath);
|
||||
free(pI);
|
||||
}
|
||||
m_Plugins.Empty();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,10 +63,7 @@ public:
|
||||
|
||||
virtual ~nsSimpleArray()
|
||||
{
|
||||
if (m_pData)
|
||||
{
|
||||
free(m_pData);
|
||||
}
|
||||
Empty();
|
||||
}
|
||||
|
||||
Entry ElementAt(unsigned long aIndex) const
|
||||
@@ -132,6 +129,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Empty()
|
||||
{
|
||||
if (m_pData)
|
||||
{
|
||||
free(m_pData);
|
||||
m_pData = NULL;
|
||||
m_nSize = m_nMaxSize = 0;
|
||||
}
|
||||
}
|
||||
BOOL IsEmpty() const { return m_nSize == 0 ? TRUE : FALSE; }
|
||||
unsigned long Count() const { return m_nSize; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user