in reply to Re^12: Techniques On Saving Memory
in thread Techniques On Saving Memory
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[ ... ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^14: Techniques On Saving Memory
by BrowserUk (Patriarch) on Mar 11, 2005 at 22:00 UTC | |
by diotalevi (Canon) on Mar 20, 2005 at 22:34 UTC | |
by BrowserUk (Patriarch) on Mar 21, 2005 at 01:23 UTC |