How can I find memory leaks in long-running Perl program?

后端 未结 5 502
别那么骄傲
别那么骄傲 2020-12-02 08:50

Perl uses reference counting for GC, and it\'s quite easy to make a circular reference by accident. I see that my program seems to be using more and more memory, and it will

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 09:36

    Seems like the cpan module Devel::Cycle is what you are looking for. It requires making some changes to your code, but it should help you find your references without too many problems.

提交回复
热议问题