On Mon, 2008-10-20 at 23:29 -0700, kenTk wrote:
> If I populate @array
> Then
> @array=();
> Is the memory that was used for that array now freed?

Yes, providing no other variable contains those items.  For example:

my @a = qw( a b c );
my @b = @a;
@a = ();

Since @b contains everything is @a, its contents are not freed until the
contents of @b are replaced.

> 
> Similarly
> If I populate the anonymous array  @{$arrayREFS[$index]}
> Then
> @{$arrayREFS[$index]}=();
> Is the memory that was used for that anonymous array now freed?

Yes but as above.


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Linux is obsolete.
-- Andrew Tanenbaum


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to