Torsten Schoenfeld wrote: > - You expose aosd_destroy. Try to avoid binding memory management > related functions. In this case, you can automate releasing the object > by writing a DESTROY xsub which calls aosd_destroy: > > void > DESTROY (Aosd *aosd) > CODE: > aosd_destroy (aosd); > > DESTROY is automatically called by perl when a variable goes out of > scope. Ok, just tried it but it doesn't work, because my Perl object is a scalar reference to Aosd*, so DESTROY doesn't get a Aosd* here, but a Perl scalar, which needs to be dereferenced first. Is there a better way than building the Perl object on a scalar reference to Aosd*? Regards, Jörn -- LINUX - Linux Is Not gnU linuX
Attachment:
pgpblbjkF0cog.pgp
Description: PGP signature