in reply to hv_store_ent
Note that both `hv_store' and `hv_store_ent' do not increment the reference count of the stored `val', which is the caller's responsibility. If these functions return a NULL value, the caller will usually have to decrement the reference count of `val' to avoid a memory leak.
Maybe create the SV with:
Or mortalize it with:SV *val = sv_newmortal();
Might work? You might need to Mortalize 'key' too.sv_2mortal(val);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: hv_store_ent
by bmdhacks (Novice) on Jan 18, 2001 at 01:46 UTC |