This avoids some issue with memory leak when leaving main earlier than expected. See #3571
Attach a file by drag & drop or click to upload