develooper Front page | perl.perl5.porters | Postings from January 2003

Re: Freeing Code

From:
notthatbbennett
Date:
January 24, 2003 08:46
Subject:
Re: Freeing Code
Message ID:
2003-01-24-2381-20107@dbl-b.com
on 2003-01-24 10:22:05-06, Rafael Garcia-Suarez <rgarciasuarez@free.fr> 
>Anonymous subroutines are compiled at compile-time, just like
>other subroutines. Thus they don't depend on the run-time
>control flow of the program.
>
Execpt those created in eval(STRING)'s as you mention below

>I think so. The situation might be different for subroutines created at
>run-time via eval(STRING), but in fact I don't think this is the case
>currently (I haven't checked).

I've done some tests with eval'ing strings in a loop to create
anon sub's and observe steady growth in memory size.  That's why
I suspect they aren't.  I have an interactive application which 
allows execution of perl fragments submitted by (trusted) user.
Seems like I'm stuck with a built-in memory leak.

Bill B.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About