Steve Hay said: > So: I've entrusted managemnt of foo's memory to Perl by placing it in > the SV, but I still have to free up anything else that was allocated and > is pointed to from within foo. Is there any way to have Perl free the > members of foo when it frees foo, so that the whole struct is freed > instead of just the outer bit?
if it's a blessed SV, so you can set up a DESTROY method. otherwise, you'll need to use a magic virtual table. it's described in perlguts ('Magic Variables') and the Embedding and Extending Perl book. -- muppet <scott at asofyet dot org>