X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3cb332c1553bb977cb8db16c19c733684ef72805..ecdbd5b0374d4771f2b011cb65978fb8f8a5cce5:/samples/ipc/client.cpp?ds=sidebyside diff --git a/samples/ipc/client.cpp b/samples/ipc/client.cpp index 99f160aaef..bda33916b1 100644 --- a/samples/ipc/client.cpp +++ b/samples/ipc/client.cpp @@ -234,8 +234,7 @@ void MyFrame::OnClose(wxCloseEvent& event) { if (m_client) { - delete m_client; - m_client = NULL; + wxDELETE(m_client); } event.Skip(); } @@ -261,8 +260,7 @@ void MyFrame::OnStart(wxCommandEvent& WXUNUSED(event)) if (!retval) { - delete m_client; - m_client = NULL; + wxDELETE(m_client); } EnableControls(); } @@ -316,8 +314,7 @@ void MyFrame::OnDisconnect(wxCommandEvent& WXUNUSED(event)) void MyFrame::Disconnect() { - delete m_client; - m_client = NULL; + wxDELETE(m_client); EnableControls(); } @@ -399,8 +396,7 @@ void MyClient::Disconnect() if (m_connection) { m_connection->Disconnect(); - delete m_connection; - m_connection = NULL; + wxDELETE(m_connection); wxGetApp().GetFrame()->EnableControls(); wxLogMessage(wxT("Client disconnected from server")); }