title: Memory leaks in List::MoreUtils' each_array() and each_arrayref()?
body: <p>I have just discovered a nasty memory leak using both each_array() and each_arrayref() from List::MoreUtils.</p>
  
  <p>These three lines of code are part of a subroutine executed four thousand times on each run.
  My objective is to give proper format to values already in a hash. I have a fixed number of hash keys and a format string for each hash key. </p>
  
  <pre><code>my %hash = ();
  # ...
  my $two_arrays = each_arrayref( $field_list, $field_list_format );
  while ( my ( $field, $format ) = $two_arrays-&gt;() ) {
      $hash{ $field } = sprintf $format, $hash{ $field };
  }
  </code></pre>
  
  <p>If I stick a <code>return;</code> before <code>my $two_arrays ...</code>, the leak disappears. The same <code>return;</code> past the last line makes the leak.</p>
  
  <p>Since the subroutine is part of a daemon program, I noticed the continuous growth of memory ( both VIRT and RES ).</p>
  
  <p>There is something I did wrong? Is there is any memory leak of each_array() or each_arrayref(), I'm not aware of?</p>
  
  <ul>
  <li>List::MoreUtil ( VERSION 0.22 )</li>
  <li>Perl 5.12.1 ( x86_64 with threads ) on Linux 2.6.32-32-generic ( Ubuntu 10.04 )</li>
  </ul>