in reply to Leaking 0-length ARRAYs!?
I know about Devel::LeakTrace::Fast, but it requires a perl built for debugging, doesn't it?
Test::LeakTrace seems to do what you need, and it does not require a debug build:
#! perl use strict; use warnings; use Test::LeakTrace; our $ref; my @info = leaked_info { my @array = (); $ref = \@array; # undef $ref; }; print join(', ', @$_) for @info;
Output (leaked SV, filename, line number):
ARRAY(0x1ddd33c), 99_SoPW.pl, 10
But, with undef $ref; uncommented, it gives no output (as there is then no leak).
HTH,
Athanasius <°(((>< contra mundum
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Leaking 0-length ARRAYs!?
by njahnke (Acolyte) on Jun 30, 2012 at 18:57 UTC |