in reply to Re: Embedded Perl - Memory leak
in thread Embedded Perl - Memory leak

You may want to look into making 'value' mortal.
No. Never make things you put into an aggregate (or things you've fetched out of an aggregate) mortal. It messes up the refcounts, will result in things being prematurely destroyed, and in some cases may end up with unusual garbage inside the aggregates.

Putting things into aggregates and taking them back out doesn't affect their refcounts.