Each refcount notch on a SV* must have an identifiable owner. In an XSUB, the caller of the xsub owns the SV*. When you return SV*s on perl stack, the mortal stack usually owns a notch. You may also return a package level SV *, without ++, then mortaling it, since the package tree owns the notch. In some cases, a non-perl-core C struct will be the owner of the SV* notch, in that case, it is upto you to destroy that C struct, and its members (once of which is a SV *) at the correct time.