in reply to Re: Help with XS and anonymous arrays
in thread Help with XS and anonymous arrays

Thanks! That did the trick. I added:
if (SvREFCNT(avref) == 0) SvREFCNT_inc(avref);

Replies are listed 'Best First'.
Re^3: Help with XS and anonymous arrays
by rafl (Friar) on Mar 29, 2006 at 00:26 UTC

    That's wrong as well. Don't conditionally increment the reference count. Incement it when you create a new reference to it and decrement it when you're not referencing to it anymore.

    Cheers, Flo