in reply to XS malloc and free
You do not free SV, you decrement its usage, and, when refcount goes to zero, it will be destroyed, and may be some destruction-time action will be activatedTo free an SV that you've created, call "SvREFCNT_dec(SV*)". Norma +lly this call is not necessary (see "Reference Counts and Mortality").
addition to free memory out from external library, consult that library's logic. Perl do not uses external char*, it will copy its data into newly created SV
Best regards,
Courage, the Cowardly Dog
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XS malloc and free
by ikegami (Patriarch) on Feb 07, 2006 at 19:02 UTC |