Re: recursive closures?
From: Uri Guttman (uri_at_stemsystems.com)
Date: 12/15/03
- Next message: Uri Guttman: "Re: Planning for maintenance"
- Previous message: Tassos: "Re: (hash|2-dim array) question"
- In reply to: Brian McCauley: "Re: recursive closures?"
- Next in thread: Brian McCauley: "Re: recursive closures?"
- Reply: Brian McCauley: "Re: recursive closures?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 15 Dec 2003 16:27:39 GMT
>>>>> "BM" == Brian McCauley <nobull@mail.com> writes:
> Uri Guttman <uri@stemsystems.com> writes:
>> my $sub ;
>> $sub = sub{ blah; $sub->() }
> That leaks.
it isn't real code anyhow. i don't recall if damian's leaked or he
weakened it.
> use Scalar::Util qw( weaken );
> my $weak_sub;
> my $sub = sub{ blah; $weak_sub->() }
> weaken($weak_sub = $sub);
it would only leak if you let it fall out of scope without destroying it
(but how?).
and i can't seem to find damian's stuff on google. i will email him
about it.
uri
-- Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
- Next message: Uri Guttman: "Re: Planning for maintenance"
- Previous message: Tassos: "Re: (hash|2-dim array) question"
- In reply to: Brian McCauley: "Re: recursive closures?"
- Next in thread: Brian McCauley: "Re: recursive closures?"
- Reply: Brian McCauley: "Re: recursive closures?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|