- or download this
SvOK_off(sv);
SvIVX(sv) = 0;
SvOBJECT_off(sv);
- or download this
SV *sv = SvRV(obj);
if (sv) {
...
mg_free(sv); /* remove any magic */
SvFLAGS(sv) = 0; /* invalidate the sv */
}
- or download this
/* Clear the sv field so that there will be no dangling ptrs */
if (it->sv) {
...
sv_setiv(it->sv,0x4242);
it->sv = NULL;
}