The table should not be destroyed here as singlestep may be re-enabled later. The foreach_steal should be enough to clear the events.