On Sat, 5 Mar 2005, muppet wrote: > > On Mar 5, 2005, at 8:53 AM, Steven N. Hirsch wrote: > > > I have been laboring under the belief that this simply marked the > > structure for cleanup when the current context was exited. Am I > > confusing > > 'mortality' with base refcnt behavior? > > yes, you are confusing them. > > SvREFCNT_dec() is #defined to sv_free(). sv_free() (Perl_sv_free in sv.c) > does the decrement and destroys the SV right then if the refcount is zero.
Ok, so if the SV is actually an reference to an AV, and the latter transitively goes to zero refcnt, is the AV freed? And, if so, are the elements of the AV similarly handled? I'm confused as to whether I get comprehensive management for "free" in the XS world, or whether the burden is on me to iterate into complex data structures. Steve