in reply to Clearing an Array of Array's from memory
Most of the time when I see someone clearing memory that way, they're not taking advantage of use strict and lexical scoping.
Instead of manually "freeing" the array, declare it my within the block of code you need it in. Perl will automatically get rid of it when you don't need it anymore. See also, Lexical scoping like a fox.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Clearing an Array of Array's from memory
by Elian (Parson) on Aug 29, 2003 at 17:26 UTC |