sv_setpvn & freeing buffer memory 
Author Message
 sv_setpvn & freeing buffer memory

if in XSUB-code in do something like the following:

        char *buf = malloc(50000);
        /* ... */
        ST(argvi) = sv_newmortal();
        sv_setpvn( (SV *) ST(argvi++), buf, x);
        XSRETURN(argvi);        

does the allocated buffer get automatically freed by perl when the
returned scalar variable goes out of scope or do i have to explicitly
free it?

best regards,
--
                aspa



Sat, 05 Jan 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. perl memory management - does @array = () free the memory?

2. Memory limitation & memory leak

3. Redirecting stdout to memory buffer or array?

4. Freeing perl memory?

5. Perl version of ssh & IO::Buffer namespace

6. Need help freeing memory...

7. freeing memory for real in perl5

8. how do i go about killing a process (fork) (and free the memory) in which

9. Freeing up memory

10. Berkeley DB - freeing memory

11. get a free domain , free design , and free host

12. getting Perl to free memory

 

 
Powered by phpBB® Forum Software