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

Re: Freeing Code

Thread Previous
Rafael Garcia-Suarez
January 24, 2003 08:22
Re: Freeing Code
Message ID: (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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About