(1) Denis Pershin's patch for wxGTK (memory leaks corrections)

(2) DELETEP/DELETEA globally renamed to wxDELETE/wxDELETEA and now also NULL
    their argument


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-08-07 15:09:04 +00:00
parent 0e072aac7a
commit a3622daa90
47 changed files with 877 additions and 715 deletions

View File

@@ -1133,7 +1133,7 @@ void wxArrayString::Grow()
memcpy(pNew, m_pItems, m_nCount*sizeof(char *));
// delete old memory (but do not release the strings!)
DELETEA(m_pItems);
wxDELETEA(m_pItems);
m_pItems = pNew;
}
@@ -1163,8 +1163,7 @@ void wxArrayString::Clear()
m_nSize =
m_nCount = 0;
DELETEA(m_pItems);
m_pItems = NULL;
wxDELETEA(m_pItems);
}
// dtor
@@ -1172,7 +1171,7 @@ wxArrayString::~wxArrayString()
{
Free();
DELETEA(m_pItems);
wxDELETEA(m_pItems);
}
// pre-allocates memory (frees the previous data!)
@@ -1183,7 +1182,7 @@ void wxArrayString::Alloc(size_t nSize)
// only if old buffer was not big enough
if ( nSize > m_nSize ) {
Free();
DELETEA(m_pItems);
wxDELETEA(m_pItems);
m_pItems = new char *[nSize];
m_nSize = nSize;
}