Why is memory not freed for a string 'foo' assignment, but is freed for a number asignment ?Because numbers are fixed length and so fit directly into the SV struct while strings are variable length and so are separately malloc()ed with a pointer stored in the SV struct.
I'm a bit surprised that it only grows by 4 bytes. It would be a bit interesting to make the string slightly longer and see how many bytes get added per iteration.
But if upgrading Perl just makes the problem go away, then someone probably already ran down this particular bug and so repeating their work probably isn't worthwhile.
Perhaps a long shot, but there was also a problem where certain types of temporary values were not free until a loop was exitted.
- tye (but my friends call me "Tye")In reply to (tye)Re2: Perl Memory Leak ??
by tye
in thread Perl Memory Leak ??
by eformat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |