Leak safety in RReLU (#39347)
Summary:
Fixes gh-38966
If `THCTensor_(resizeAs)` fails to allocate, then these `free`s will never be reached. So, instead I use a wrapped tensor to do cleanup automatically.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39347
Differential Revision: D21838933
Pulled By: ezyang
fbshipit-source-id: 8c74ecdd720d6712a33ddef6126ea545761a269b