This leaks memory. However, if I make the key be a char * and instead use hv_store it does not leak memory. So here's my question: Do I have to free up the SV* key when I'm done using it in hv_store_ent, or is some other error causing my memory leak?void add_entry(hash) HV * hash PREINIT: SV * key; SV * val; CODE: key = newSViv( (IV)someint ); val = newSViv( (IV)otherint ); hv_store_ent( hash, key, val, 0 );
In reply to hv_store_ent by bmdhacks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |