WM_DESTROY is sent when a window's non-client area is being destroyed, just before destruction completes. This is the appropriate time for cleanup operations like releasing resources, freeing memory, and destroying child windows. After WM_DESTROY, the window procedure receives WM_NCDESTROY.