Fixed by deleting stuff from the main loop, which is the right place to delete ConnectionInfo since it is created there.