Use wxDELETE() and wxDELETEA() when possible.
Use wxDELETE[A]() functions which automatically NULL out their arguments after deleting them instead of doing it manually. Closes #9685. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -650,8 +650,7 @@ EventWorker::DoRead()
|
||||
if (m_size == m_infill)
|
||||
{
|
||||
m_signature[0] = m_signature[1] = 0x0;
|
||||
delete [] m_inbuf;
|
||||
m_inbuf = NULL;
|
||||
wxDELETEA(m_inbuf);
|
||||
m_infill = 0;
|
||||
return;
|
||||
}
|
||||
@@ -713,8 +712,7 @@ void EventWorker::DoWrite()
|
||||
{
|
||||
if (m_written == m_size)
|
||||
{
|
||||
delete [] m_outbuf;
|
||||
m_outbuf = NULL;
|
||||
wxDELETEA(m_outbuf);
|
||||
m_outfill = 0;
|
||||
LogWorker( "All data written");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user