wxRichTextImageBlock::~wxRichTextImageBlock()
{
- if (m_data)
- {
- delete[] m_data;
- m_data = NULL;
- }
+ wxDELETEA(m_data);
}
void wxRichTextImageBlock::Init()
void wxRichTextImageBlock::Clear()
{
- delete[] m_data;
- m_data = NULL;
+ wxDELETEA(m_data);
m_dataSize = 0;
m_imageType = wxBITMAP_TYPE_INVALID;
}
void wxRichTextImageBlock::Copy(const wxRichTextImageBlock& block)
{
m_imageType = block.m_imageType;
- if (m_data)
- {
- delete[] m_data;
- m_data = NULL;
- }
+ wxDELETEA(m_data);
m_dataSize = block.m_dataSize;
if (m_dataSize == 0)
return;
bool wxRichTextBufferDataObject::SetData(size_t WXUNUSED(len), const void *buf)
{
- delete m_richTextBuffer;
- m_richTextBuffer = NULL;
+ wxDELETE(m_richTextBuffer);
wxString bufXML((const char*) buf, wxConvUTF8);
{
wxLogError(wxT("Could not read the buffer from an XML stream.\nYou may have forgotten to add the XML file handler."));
- delete m_richTextBuffer;
- m_richTextBuffer = NULL;
+ wxDELETE(m_richTextBuffer);
return false;
}