Re: help with memory leak

[email protected] (Oliver Seeliger)
Newsgroups perl.xs
Message-ID <[email protected]>
I had the same problem when I returned an AV *.

You have to use the sv_2mortal macro in order to have the correct ref count.

AV * subset = (AV *)sv_2mortal((SV *)newAV());

 > I think the problem is the reference count of the AV*. Is that
 > correct? How should I build/return it to prevent that?
 > AV* subset   = newAV();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.