The permitted ways to destroy a Windows object are
CWnd Destroy member function
Explicitly deleting with the delete operator.
Manually closing the windows
Calling CWnd::DestroyWindow or the Windows API DestroyWindow.