1Devel::LeakGuard::ObjecUts:e:rStCaotnet(r3i)buted Perl DDoecvuemle:n:tLaetaikoGnuard::Object::State(3)
2
3
4
6 Devel::LeakGuard::Object::State - Scoped object leak checking
7
9 This document describes Devel::LeakGuard::Object::State version 0.08
10
12 use Devel::LeakGuard::Object::State;
13
14 # Later
15 my $leakstate = Devel::LeakGuard::Object::State->new(
16 on_leak => 'die'
17 );
18
19 My::Thing->leaky();
20
21 $leakstate->done;
22
24 A "Devel::LeakGuard::Object::State" captures the current leakstate of
25 object allocations within a program. When "done" is called the saved
26 allocation leakstate is compared with the current leakstate and any
27 discrepancies are reported.
28
30 "new"
31 Create a new "Devel::LeakGuard::Object::State". A number of options may
32 be supplied. To see the full list refer to "leakguard" in
33 Devel::LeakGuard::Object.
34
35 "done"
36 Call "done" at the end of the area of code to be leak-checked. If
37 allocation imbalances are detected the action taken depends on the
38 options passed to "new". By default a warning is displayed.
39
41 Andy Armstrong "<andy@hexten.net>"
42
44 Copyright (c) 2009-2015, Andy Armstrong "<andy@hexten.net>".
45
46 This module is free software; you can redistribute it and/or modify it
47 under the same terms as Perl itself. See perlartistic.
48
49
50
51perl v5.34.0 2021-07-22Devel::LeakGuard::Object::State(3)