I didn't explain properly about the lack of leak.
There would be no leak even if you did use mortals. There's already a ENTER+SAVETMPS and FREETMPS+LEAVE around the call to the XS function.
You'd use those or G_DISCARD if you want to free the mortals created by your callback sooner (e.g. after every call to call_sv instead of when strIter returns).
In reply to Re^2: Help me improve my XS.
by ikegami
in thread Help me improve my XS.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |