in reply to Re^3: Managing C library memory in XS
in thread Managing C library memory in XS

The library you are using knows about the references and counts

Ahh.. No. It does not.

There's not more to the C library interface than I described. Functions returning pointers and a documentation which tells you if you are allowed to free the returned pointer. No reference counting. It's plain C without any magic.

Replies are listed 'Best First'.
Re^5: Managing C library memory in XS
by dmitri (Priest) on May 05, 2014 at 13:10 UTC
    As long as there is a way to know this programmatically, you are good: program it into your XS module. If there is not, I think you're screwed no matter at which level you code it.
      I think you could say that about any programming problem.