Assert instances of cls are deallocated after iterating.
test.support/check_free_after_iterating
check_free_after_iterating