- MGR: Use Destroy() instead of deleting the this pointer to cleanup

the dialog.

    clientgui/
        DlgEventLog.cpp, .h

svn path=/trunk/boinc/; revision=20012
This commit is contained in:
Rom Walton 2009-12-22 17:35:27 +00:00
parent 711430b081
commit 918a7e5d26
1 changed files with 7 additions and 5 deletions

View File

@ -122,7 +122,7 @@ CDlgEventLog::~CDlgEventLog() {
* CDlgEventLog creator
*/
bool CDlgEventLog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
bool CDlgEventLog::Create( wxWindow* WXUNUSED(parent), wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin CDlgEventLog member initialisation
m_iPreviousDocCount = 0;
@ -217,6 +217,7 @@ void CDlgEventLog::CreateControls()
wxButton* itemButton44 = new wxButton(this, wxID_OK, _("Close"), wxDefaultPosition, wxDefaultSize);
itemBoxSizer4->Add(itemButton44, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#ifndef __WXMSW__
#ifdef __WXMAC__
wxButton* itemButton45 = new wxButton(this, ID_SIMPLE_HELP, _("Help"), wxDefaultPosition, wxDefaultSize);
itemButton45->SetHelpText(
@ -230,6 +231,7 @@ void CDlgEventLog::CreateControls()
wxContextHelpButton* itemButton45 = new wxContextHelpButton(this);
itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#endif
#endif
}
@ -288,8 +290,8 @@ void CDlgEventLog::OnHelp(wxHelpEvent& event) {
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
*/
void CDlgEventLog::OnOK( wxCommandEvent& /*event*/ ) {
delete this;
void CDlgEventLog::OnOK( wxCommandEvent& WXUNUSED(event) ) {
Destroy();
}
@ -297,8 +299,8 @@ void CDlgEventLog::OnOK( wxCommandEvent& /*event*/ ) {
* wxEVT_CLOSE event handler for CDlgEventLog (window close control clicked)
*/
void CDlgEventLog::OnClose(wxCloseEvent& event) {
delete this;
void CDlgEventLog::OnClose(wxCloseEvent& WXUNUSED(event)) {
Destroy();
}