develooper Front page | perl.perl5.porters | Postings from October 2021

Re: leak testing modules [was: [Encode] 3.15 Released]

Thread Previous | Thread Next
Paul "LeoNerd" Evans
October 11, 2021 20:54
Re: leak testing modules [was: [Encode] 3.15 Released]
Message ID:
On Mon, 11 Oct 2021 20:43:09 +0000
Eric Wong <> wrote:

> Does anybody here have suggestions on how to go about adding
> leak tests to packages like Encode?

I usually use Test::Refcount.

  (Disclaimer: I wrote it)

It asserts that the refcount of a thing is what the test script claims
it to be (often 1). If it fails, it writes a heapdump file you can
analyse using Devel::MAT.

  (Disclaimer: I wrote that too)

Paul "LeoNerd" Evans      |  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About