in reply to Garbage-collecting with closures
That will create a new copy of $foo every time and it will not get cleaned up. I don't know if 5.8 did anything to address this or not.my $foo; sub leaky { my $closure = sub { $foo++ }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re2: Garbage-collecting with closures
by dragonchild (Archbishop) on Feb 19, 2003 at 23:25 UTC | |
by perrin (Chancellor) on Feb 19, 2003 at 23:37 UTC | |
|
Re: Re: Garbage-collecting with closures
by Courage (Parson) on Feb 20, 2003 at 08:53 UTC | |
by perrin (Chancellor) on Feb 20, 2003 at 15:02 UTC | |
by Courage (Parson) on Feb 20, 2003 at 19:35 UTC |