Re: Is this a memory leak? (Math::Factor::XS)

[email protected] (bulk88)
Newsgroups perl.xs
Message-ID <[email protected]>
Ben Bullock wrote:
> I am just looking at someone else's code here:
>
> https://github.com/benkasminbullock/Math-Factor-XS/blob/master/XS.xs#L41
>
> From the recent discussion on this list, I get the impression that is 
> a memory leak of "factors". Is that a correct understanding? Should I 
> report this as a bug?
>
> Also, what is the test module for XS memory leaks on objects created 
> via newAV, newHV?
>
factors is freed at 
https://github.com/benkasminbullock/Math-Factor-XS/blob/master/XS.xs#L64  
unless a croak/die happen, then it is leaked. It doesn't look like there 
is any code that will do that tho, so I think the code looks fine. If 
you want another opinion, ask on Perlmonks.
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.