![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re: Embedded Perl - Memory leakby Molt (Chaplain) |
on Oct 16, 2003 at 10:39 UTC ( #299706=note: print w/replies, xml ) | Need Help?? |
You may want to look into making 'value' mortal. It's been a while since I touched internals but what I think is happening is that the newSVpvn() call is producing as SV with a refcount of one, when it's pushed onto the array this is going up to two, and hence going back down to one when the array is destroyed.. and not being destroyed. I seem to recall this being discussed in "Extending and Embedding Perl", but I don't have my copy at work so can't check.
In Section
Seekers of Perl Wisdom
|
|