Alloc() doesn't clear the array any more, for consistency with reserve()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-28 14:16:20 +00:00
parent 84498436c9
commit 7788fc4046
5 changed files with 21 additions and 20 deletions

View File

@@ -244,23 +244,6 @@ void name::Clear() \
wxDELETEA(m_pItems); \
} \
\
/* pre-allocates memory (frees the previous data!) */ \
void name::Alloc(size_t nSize) \
{ \
/* only if old buffer was not big enough */ \
if ( nSize > m_nSize ) { \
wxDELETEA(m_pItems); \
m_nSize = 0; \
m_pItems = new T[nSize]; \
/* only alloc if allocation succeeded */ \
if ( m_pItems ) { \
m_nSize = nSize; \
} \
} \
\
m_nCount = 0; \
} \
\
/* minimizes the memory usage by freeing unused memory */ \
void name::Shrink() \
{ \