Revert D22908795: [pytorch][PR] Fix segfault in `THPGenerator_dealloc`
Test Plan: revert-hammer
Differential Revision:
D22908795 (https://github.com/pytorch/pytorch/commit/d3acfe3ba8c74cd040fb6ea68228ae5ba00750d6)
Original commit changeset: c5b6a35db381
fbshipit-source-id: c7559c382fced23cef683c8c90cff2d6012801ec