catch exception in __del__
catch exception in __del__

Summary: Pull Request resolved: https://github.com/fairinternal/detectron2/pull/312

Differential Revision: D18009716

Pulled By: ppwwyyxx

fbshipit-source-id: 27c2063a0d109fcc4a36efa98d3d2d6765cd27e2

facebookresearch/detectron2,facebookresearch/detectron2,facebookresearch/detectron2