char * sStringBuffer = new char [Max (strlen(theString)+1, 1024)];
sprintf (sStringBuffer, aFormat.ToCString(), theString);
TCollection_ExtendedString aStr ( sStringBuffer );
- delete sStringBuffer;
+ delete [] sStringBuffer;
sStringBuffer = 0;
// replace the format placeholder by the actual string
char* astr = new char[theString.LengthOfCString()+1];
theString.ToUTF8CString (astr);
Send ( astr, theGravity, putEndl );
- delete astr;
+ delete [] astr;
+ astr = 0;
}
else {
TCollection_AsciiString aStr ( theString, '?' );