X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e536b75069b5caa8333c5609bfe05b68ba2b5653..e733c4ce1e24cf7e4b0b0d8362fc59aaa7a7641c:/samples/ipc/server.cpp diff --git a/samples/ipc/server.cpp b/samples/ipc/server.cpp index 4bd26352a2..5c34fdcb61 100644 --- a/samples/ipc/server.cpp +++ b/samples/ipc/server.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Jurgen Doornik // Created: 25/01/99 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -32,7 +31,7 @@ // we're using TCP/IP or real DDE. #include "ipcsetup.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif @@ -160,11 +159,7 @@ void MyFrame::UpdateUI() void MyFrame::OnClose(wxCloseEvent& event) { - if (m_server) - { - delete m_server; - m_server = NULL; - } + wxDELETE(m_server); event.Skip(); } @@ -185,8 +180,7 @@ void MyFrame::OnStart(wxCommandEvent& WXUNUSED(event)) else { wxLogMessage("Server %s failed to start", servername); - delete m_server; - m_server = NULL; + wxDELETE(m_server); } UpdateUI(); } @@ -262,8 +256,7 @@ void MyServer::Disconnect() { if ( m_connection ) { - delete m_connection; - m_connection = NULL; + wxDELETE(m_connection); wxGetApp().GetFrame()->UpdateUI(); wxLogMessage("Disconnected client"); }