/* Clear the sv field so that there will be no dangling ptrs */ if (it->sv) { // SvOBJECT_off((SV *)it->sv); /* problematic, issue #385 */ mg_free(it->sv); /* remove any magic instead */ sv_setiv(it->sv,0x4242); it->sv = NULL; }