On 2004-01-01, at 19:09:51 +0000, [EMAIL PROTECTED] wrote:

> | 
> | You can simply add a CLEANUP section (see 'perldoc perlxs' and search
> | for CLEANUP) to your wlgetbyid() XSUB and free the memory allocated
> | by g_strdup():
> | 
> |     CLEANUP:
> |         free(str);  /* or similar call to free the memory */
> | 
> | This should take care of your memory leakage.
> 
> Hmms.. maybe I've found some other problem.
> I have a function where a AV* array is created and returned.
> Who should delete/free this array?

Code?

Normally you shouldn't have to care and perl should take care
of freeing the AV. What you have to take care of is Reference
Counts. 'perldoc perlguts' has a section on it.

-- 
IBM:
        It may be slow, but it's hard to use.

Reply via email to