I'm not sure if it is leaking memory, but the forwards pass may leave some objects around that the gc may not be able to clear.