Detecting Leaky Objects by Line Number

Overview

Devel::Leak::Object and Devel::LeakGuard::Object do a good job of informing one if they have leaky objects. They will even tell you which object and how many times it was not destroyed. However, finding exactly which line of code cause the leaks may not be Perl 101 for everybody so this paper is an attempt to create a module that would do just that.

Design Notes

Suggestion

I asked mst if something could be built upon Devel::Leak::Object that would show the line number from where a leak is originating. He suggested:

When your custom bless() is called you could trap the caller() info to get the line number and file, and Devel::Cycle’s find_cycle could show you the cycle itself.

Translation

My tags:
 
Popular tags:
 
Powered by MojoMojo