void CComDlg::OnDestroy() { delete[] pbLife; delete[] temppbLife; m_life = FALSE; CDialog::OnDestroy(); KillTimer(m_uTimerID); }