Re: generic refcounted object perl binding



Torsten Schoenfeld <kaffeetisch gmx de> writes:

I wanted to link to some XS tutorial covering all this, but the
example at <http://perldoc.perl.org/perlxstut.html#EXAMPLE-6> actually
uses a different pattern to achieve the same thing: it mortalizes both
the referent and the reference,

I suppose mortalizing intermediate parts guards against leaking them if
some of the construction code throws an error.  Not that there'd be much
chance of that in that example (maybe weirdness like a tied input array
which decided to croak on every second access ... :-).  A fairly decent
idea in general though.


-- 
These prestigious wrought-iron security gates are bullet-proof,
bomb-proof, and battering-ram resistant.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]