Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Managing C library memory in XSby dmitri (Priest) |
on May 05, 2014 at 12:32 UTC ( [id://1085055]=note: print w/replies, xml ) | Need Help?? |
And the problem is that I can't see when I get a "person" pointer I get back in DESTROY whether I'm allowed to free it. This is the key paragraph and decision point in the code. You should wrap the real free_person() in XS function that would have the logic like this:
Then from Perl just call this wrapper and let the lower-level logic worry about it.
In Section
Seekers of Perl Wisdom
|
|