- // we rely on a reasonable realloc() implementation here - so far I haven't
- // seen any which wouldn't behave like this
+ if ( p != pData )
+ {
+ // contrary to what one might believe, some realloc() implementation do
+ // move the memory block even when its size is reduced
+ pData = (wxStringData *)p;
+
+ m_pchData = pData->data();
+ }