On Aug 15, 2004, at 4:14 PM, Tels wrote:
First, thank you all for your time and tricks and tipps.
no problem.
See the sv2mortal(ST(0)); there? :) I think it doesn't hurt, but it certainly is not neccessary, since everything works fine without it.
the point of the sv_2mortal() is leak prevention. what if calling code doesn't take a reference on the values from the stack? they should go away. without the stuff on the stack being mortal, they might not ever get unref'ed.
of course, this is subject to subtleties like scratchpads and different treatment of simple values and such, so i won't dare to say your code is leaking, but in my own experience, i needed the sv_2mortal() to avoid leaking scalars, especially references. perhaps nick could say definitively.
/me looks expectantly at nick
--
How come hair colors for women take an hour, but "wash out the gray" stuff for men only five minutes? This is so unfair!
-- Elysse, complaining about commercials