[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
[MacPerl] Re: clearing an array
- To: mac-perl@iis.ee.ethz.ch (Return requested), jann@jann.com (Return requested)
- Subject: [MacPerl] Re: clearing an array
- From: "Patton, Paul B (MN10)" <Paul.B.Patton@HBC.honeywell.com>
- Date: 23 Jun 1997 18:28:47 -0500
- Alternate-Recipient: Allowed
- Content-Identifier: 0253033AF06AF2A2
- Content-Return: Allowed
- Conversion: Allowed
- Disclose-Recipients: Prohibited
- Original-Encoded-Information-Types: IA5-Text
- X400-Content-Type: P2-1988 ( 22 )
- X400-MTS-Identifier: [/c=US/admd=MCI/prmd=Honeywell/; 0253033AF06AF2A2-HW-MTA-MN]
- X400-Originator: Paul.B.Patton@HBC.honeywell.com
- X400-Received: by mta HW-MTA-MN in /c=US/admd=MCI/prmd=Honeywell/; Relayed; 23 Jun 1997 18:28:47 -0500
- X400-Received: by /c=US/admd=MCI/prmd=Honeywell/; Relayed; 23 Jun 1997 18:28:47 -0500
- X400-Recipients: non-disclosure;
>Will the following clear an array totally from memory?
>
>%array = ();
>
>
> or does it just zero all the elements thereof?
>
>The reason I am asking is I am getting "out of memory" errors and I could
>zero the arrays after use. This would free up memory by 75%!
>
>TIA
>
>Jann
According to the Camel book:
undef EXPR
undefines the value of EXPR ... use only on a scalar value, an
entire array or hash, or ... Any storage associated with the
object will be recovered for reuse (though not returned to the
system, for most versions of UNIX) ...
Thus:
undef %array; # should do what you want
-Paul- paul.b.patton@hbc.honeywell.com
***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch