good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^6: perlembed: mortalize an AV or not (misc)by edan (Curate) |
on Jul 11, 2006 at 05:25 UTC ( [id://560314]=note: print w/replies, xml ) | Need Help?? |
Thanks tye - this is extremely helpful. So I just want to make sure that I understood properly what you recommend to do. Does the following code give a decent example of how to push an array ref and a hash ref onto the stack?
I'd really appreciate it if you could validate this approach, which is my understanding of what you explained above. Regarding your other questions:
So wouldn't it be better if I do mortalize everything, and just SvREFCNT_inc whenever I either av_push() or hv_store() the SV, as well as using newRV_inc()? Will that not work and be correct?
In Section
Seekers of Perl Wisdom
|
|