gc() and exit() methods