larry, did this get fixed recently? it still leaks in my copy.
------- start of forwarded message -------
Path: csnews!boulder!news.coop.net!coopnews.coop.net!indra.com!world!news.kei.com!news.mathworks.com!uunet!in1.uu.net!news.iii.net!iii2.iii.net!not-for-mail
From: elliot@iii2.iii.net (Elliot Mednick)
Newsgroups: comp.lang.perl.misc
Subject: Re: Out of Memory! -- any ideas?
Date: 9 Oct 1995 10:22:08 -0400
Organization: iii-net
Lines: 33
Message-ID: <45bb6g$o49@iii2.iii.net>
References: <Pine.3.89.9509271208.B29277-0100000@use1.eglin.af.mil> <44q76v$pg@nntp5.u.washington.edu> <453r8o$2dv@iii2.iii.net> <456rc6$guc@csnews.cs.colorado.edu>
NNTP-Posting-Host: iii2.iii.net
X-Newsreader: TIN [version 1.2 PL2]
Tom Christiansen (tchrist@mox.perl.com) wrote:
: Failed evals always leak.
My code looks like this:
eval ($statement);
if ($@) {
&report_error();
}
No error is reported and memory leaks anyway. 5.001m.
This reproduces the problem:
for ($i = i; $i < 10000000; $i++) {
&do_it ($i);
}
sub do_it
{
local $b;
local $expr = '$b = $_[0]';
# eval ('$b = $a;'); # this eats memory
# eval {$b = $_[0]}; # this does not eat memory
eval "$expr"; # this also eats memory
# print "$b\n";
}
--
Elliot Mednick P.O. Box 150
Wellspring Solutions, Inc. Sutton, MA. 01590
(508) 865-7271
<elliot@wellspring.com> (508) 865-1113 [fax]
------- end of forwarded message -------
--
Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com
Ear, but earn and wear and tear
Do not rhyme with here but ere.
------- start of forwarded message -------
Path: csnews!boulder!news.coop.net!coopnews.coop.net!indra.com!world!news.kei.com!news.mathworks.com!uunet!in1.uu.net!news.iii.net!iii2.iii.net!not-for-mail
From: elliot@iii2.iii.net (Elliot Mednick)
Newsgroups: comp.lang.perl.misc
Subject: Re: Out of Memory! -- any ideas?
Date: 9 Oct 1995 10:22:08 -0400
Organization: iii-net
Lines: 33
Message-ID: <45bb6g$o49@iii2.iii.net>
References: <Pine.3.89.9509271208.B29277-0100000@use1.eglin.af.mil> <44q76v$pg@nntp5.u.washington.edu> <453r8o$2dv@iii2.iii.net> <456rc6$guc@csnews.cs.colorado.edu>
NNTP-Posting-Host: iii2.iii.net
X-Newsreader: TIN [version 1.2 PL2]
Tom Christiansen (tchrist@mox.perl.com) wrote:
: Failed evals always leak.
My code looks like this:
eval ($statement);
if ($@) {
&report_error();
}
No error is reported and memory leaks anyway. 5.001m.
This reproduces the problem:
for ($i = i; $i < 10000000; $i++) {
&do_it ($i);
}
sub do_it
{
local $b;
local $expr = '$b = $_[0]';
# eval ('$b = $a;'); # this eats memory
# eval {$b = $_[0]}; # this does not eat memory
eval "$expr"; # this also eats memory
# print "$b\n";
}
--
Elliot Mednick P.O. Box 150
Wellspring Solutions, Inc. Sutton, MA. 01590
(508) 865-7271
<elliot@wellspring.com> (508) 865-1113 [fax]
------- end of forwarded message -------
--
Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com
Ear, but earn and wear and tear
Do not rhyme with here but ere.