SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

Devel::Leak::Object

Section: User Contributed Perl Documentation (3)
Updated: 2009-10-21
Index 

NAME

Devel::Leak::Object - Detect leaks of objects 

SYNOPSIS

  # Track a single object  use Devel::Leak::Object;  my $obj = Foo::Bar->new;  Devel::Leak::Object::track($obj);    # Track every object  use Devel::Leak::Object qw{ GLOBAL_bless };  # Track every object including where they're created  use Devel::Leak::Object qw{ GLOBAL_bless };  $Devel::Leak::Object::TRACKSOURCELINES = 1;
 

DESCRIPTION

This module provides tracking of objects, for the purpose of detecting memoryleaks due to circular references or innappropriate caching schemes.

Object tracking can be enabled on a per object basis. Any objectsthus tracked are remembered until DESTROYed; details of any objectsleft are printed out to STDERR at END-time.

  use Devel::Leak::Object qw(GLOBAL_bless);

This form overloads bless to track construction and destruction of allobjects. As an alternative, by importing bless, you can just track theobjects of the caller code that is doing the use.

If you use GLOBAL_bless to overload the bless function, please note thatit will ONLY apply to bless for modules loaded AFTER Devel::Leak::Objecthas enabled the hook.

Any modules already loaded will have already bound to CORE::bless and willnot be impacted.

Setting the global variable $Devel::Leak::Object::TRACKSOURCELINES makes thereport at the end include where (filename and line number) each leaked objectoriginates. 

BUGS

Please report bugs to http://rt.cpan.org 

AUTHOR

Adam Kennedy <adamkAATTcpan.org>

With some additional contributions from David Cantrell <davidAATTcantrell.org.uk> 

SEE ALSO

Devel::Leak 

COPYRIGHT

Copyright 2007 - 2009 Adam Kennedy.

Rewritten from original copyright 2004 Ivor Williams.

Some documentation also copyright 2004 Ivor Williams.

This program is free software; you can redistributeit and/or modify it under the same terms as Perl itself.

The full text of the license can be found in theLICENSE file included with this module.


 

Index

NAME
SYNOPSIS
DESCRIPTION
BUGS
AUTHOR
SEE ALSO
COPYRIGHT

This document was created byman2html,using the manual pages.