in reply to Re: Reference to guard not released
in thread Reference to guard not released

This is the kind of not-so-deep magic that you must understand if you use closures. Devel::RefCount may be useful to diagnose problems.