in reply to Re^3: perlembed: mortalize an AV, get "Attempt to free unreferenced scalar" - don't mortalize, leaks memory
in thread perlembed: mortalize an AV, get "Attempt to free unreferenced scalar" - don't mortalize, leaks memory
You probably actually wanted a more recent copy of the source. av_clear doesn't free the memory allocated to the array nor does it free the SVs that form its elements. It simply truncates the array.
/J\
In Section
Seekers of Perl Wisdom