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

Re: Freeing Code

Thread Previous
From:
Rafael Garcia-Suarez
Date:
January 24, 2003 08:22
Subject:
Re: Freeing Code
Message ID:
20030124172205.389b32da.rgarciasuarez@free.fr
notthatbbennett@yahoo.com (Bill Bennett) wrote:
> Let me apologize for the naive question, but here it is:
> 
> When the last pointer to an anonymous subroutine is derefed, is
> the space into which the code is compiled free'd?

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.

> I think not, based on observations.  Is this correct?

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).

Thread Previous


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