Nick Ing-Simmons <[EMAIL PROTECTED]> wrote:
> Dave Storrs <[EMAIL PROTECTED]> writes:
> >On Tue, 21 Nov 2000, Jarkko Hietaniemi wrote:
> >
> >> Yet another bummer of the current SVs is that they poorly fit into
> >> 'foreign memory' situations where the buffer is managed by something
> >> else than Perl.  "No, thank you, Perl, keep your greedy fingers off
> >> this chunk.  No, you may not play with it."
> >
> >
> >     Out of curiousity, when might such a situation arise?  When you
> >are embedding C in Perl, perhaps?
> 
> Or calling an external library which returns a pointer to data.
> Right now we _have_ to copy it as there is no way to tell perl 
> to (say) XFree() it rather than Safefree() it. Which is a pain when data
> is big.

As long as destroy() is one of the vtable methods, then it should be
fairly easy for someone to write an SV wrapper type that calls a specific
XXXXfree() - either fixed per type, or per SV.

Roll on perl6 :-)

Dave M.

Reply via email to