Russ Allbery <[EMAIL PROTECTED]> writes:
>
>I was assuming that the use Inline bit was handling the magic of taking a
>C return value and translating it into a Perl stack return; is that
>correct?  Normally I'm used to having to mark stack return values as
>mortal, which also plays around with the reference count.

mortal doesn't do anything to the refcount at the time it is called.
It arranges for it to be decremented when you leave the current "scope"
i.e. ENTER ... LEAVE. This is typically the end of the perl statement.

>
>> I think you/we must be on the right track, but we have yet to ferret out
>> the actual culprit that is not having its reference count handled

If it spews a lot of them then my feeling is that it is the array's content
SVs that are the problem.

I common problem is that the thing _calling_ the XSUB will typically 
have made the values passed in "mortal". So if you want them to persist
(e.g. store them in an AV) you need to copy them or increment their
refcounts.

-- 
Nick Ing-Simmons

Reply via email to