X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/66034aba2e3aecd6f1af6803d44befe611191399..8a31648287be0ef976f133de2786b137f1e98340:/samples/sockets/baseserver.cpp?ds=sidebyside diff --git a/samples/sockets/baseserver.cpp b/samples/sockets/baseserver.cpp index ae30bce692..ac856e80a2 100644 --- a/samples/sockets/baseserver.cpp +++ b/samples/sockets/baseserver.cpp @@ -6,7 +6,7 @@ // Created: 27.06.2005 // RCS-ID: $Id$ // Copyright: (c) 2005 Lukasz Michalski -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -315,7 +315,7 @@ bool Server::OnInit() m_listeningSocket->SetEventHandler(*this); m_listeningSocket->SetNotify(wxSOCKET_CONNECTION_FLAG); m_listeningSocket->Notify(true); - if (!m_listeningSocket->Ok()) + if (!m_listeningSocket->IsOk()) { wxLogError("Cannot bind listening socket"); return false; @@ -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;