[SR] Wrap check_for_memory_leak with DCHECK (#69588)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69588
Code cleanup
Reviewed By: mikeiovine
Differential Revision: D32938333
fbshipit-source-id: d15dc405b281411c4c3c27a1dabf82f430c3ed08