Re: Memory escaping while using array reallocation.
"webmaster" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
Hello, again.
You wrote:
[...]
> Hey, why take our word for it... try it. :-)
[...]
Good idea, but how about to use scoping rules:
while ( [some condition] ) {
{
{
my @array = (1,2,3,4,5,6);
... some code ...
} # local scope (inner level)
# the array have been cleaned up properly here
my @array = ();
... array manipulation instructions ...
}# local scope (outer level)
# the array have been cleaned up properly here
}# while
Thanks.
, AZtpa
Previous discussion :
> ----- Original Message -----
> From: "webmaster" <[email protected]>
> To: "Perl_sql" <[email protected]>
> Sent: Monday, December 06, 2004 4:55 AM
> Subject: Memory escaping while using array reallocation.
>
>
> > Hi, everybody.
> >
> > I'm wondering if I use next instructions:
> > while ( [some condition] ) {
> > my @array = (1,2,3,4,5,6);
> > ... some code ...
> > @array = ();
> > }
> > then I hope Perl environment must be care about sufficient usage memory
> > zone, occupied by array allocation during first declaration (e.g. my
> > @array
> > = (1,2,3,4,5,6);). Does it clean up all elements of array properly while
> > proccessing statement '@array = ()' ?
> >
> > Thanks
> > , AZtpa
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/[email protected]