void MyFrame::OnClose(wxCloseEvent& event)
{
- if (m_server)
- {
- delete m_server;
- m_server = NULL;
- }
+ wxDELETE(m_server);
event.Skip();
}
else
{
wxLogMessage("Server %s failed to start", servername);
- delete m_server;
- m_server = NULL;
+ wxDELETE(m_server);
}
UpdateUI();
}
{
if ( m_connection )
{
- delete m_connection;
- m_connection = NULL;
+ wxDELETE(m_connection);
wxGetApp().GetFrame()->UpdateUI();
wxLogMessage("Disconnected client");
}