I've never needed to use this myself but this is what I've seen other people like demerphq use when working with aliases. You could then keep @foo around somewhere and it handles the details that the values in the variables exist at some other location (without having to use another reference) and because its an alias, would handle holding weakened references just fine. That's the theory anyway. If this module doesn't do it right, this is at least the right idea. The array is implemented as a C array of pointers so all this does it make your packed list of pointers "real" instead of faked in a string.
use Lexical::Alias 'alias'; my $src; alias $src, $foo[ ... ]
In reply to Re^13: Techniques On Saving Memory
by diotalevi
in thread Techniques On Saving Memory
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |