Skip Menu |

This queue is for tickets about the Want CPAN distribution.

Report information
The Basics
Id: 28224
Status: resolved
Priority: 0/
Queue: Want

People
Owner: robin [...] cpan.org
Requestors: hooo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.14
Fixed in: (no value)



Subject: memory leak
There is a memory leak, the following code snip descripes the problem. use strict; use warnings; use Want; sub foo : lvalue { my $x; $x = Want::want('ASSIGN'); $x } foo = 1 foreach 1..1_000_000; __END__
On So. 15. Jul. 2007, 06:12:27, HOOO wrote: Show quoted text
> There is a memory leak, the following code snip descripes the problem. > > use strict; > use warnings; > use Want; > > sub foo : lvalue { my $x; $x = Want::want('ASSIGN'); $x } > > foo = 1 foreach 1..1_000_000; > > __END__
a save solution is to use a tied variable use strict; use warnings; use Tie::Scalar; our $x; tie $x, 'Tie::StdScalar'; sub foo : lvalue { $x } foo = 1 foreach 1..10_000_000; __END__
This will be fixed in the next release. Robin