http://www.perlmonks.org?node_id=911074


in reply to memory leakage
in thread memory usage and leakage

Added
use Devel::LeakGuard::Object qw(leakguard);
and then leakguard around the for loop and I got:
Object leaks found: Class Before After Delta FileHandle 0 10 10 IO::Select 0 20 20 IO::Socket::SSL 0 10 10 IO::Socket::SSL::SSL_Context 0 10 10 IO::Socket::SSL::SSL_HANDLE 0 10 10 Net::XMPP::Client 0 10 10 Net::XMPP::Debug 0 10 10 XML::Stream 0 10 10 XML::Stream::Parser 0 20 20 utf8 0 1 1
I guess this means there is a memory leak.