Skip Menu |

This queue is for tickets about the Rose-HTML-Objects CPAN distribution.

Report information
The Basics
Id: 38837
Status: resolved
Priority: 0/
Queue: Rose-HTML-Objects

People
Owner: Nobody in particular
Requestors: cpan [...] funkreich.de
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.550
  • 0.551
  • 0.552
  • 0.5521
  • 0.553
  • 0.554
Fixed in: (no value)



Subject: Certain form fields (e.g. selectbox) cause a memory leak
Here's a simple example which shows that using a selectbox field causes a memory leak. If you omit the options key, the leak goes away. Downgrade to Rose::HTML::Form 0.549 and the leak is gone, too. Simple text fields seem to work fine. Every version from 0.550 upwards seems to be affected. package LeakForm; use Rose::HTML::Form; use base qw/ Rose::HTML::Form /; sub build_form { shift->add_fields( myfield => { type => 'selectbox', options => [ 'm' => { label => 'aLabel' } ], }, ); } package main; my $last_size = 0; for( 0..1000 ) { my $form = LeakForm->new(); # Check process size (needs linux) open my $proc, '<', '/proc/self/statm'; my( $size, $share ) = ( 0, 0 ); ( $size, $share ) = ( split /\s/, scalar <$proc> )[0,2]; close $proc; if( $size > $last_size ) { print "$size (+" . ($size - $last_size) . ")\n"; $last_size = $size; } }
This is fixed in SVN (revision 1740) and the fix will go out in the next release. (If you can't wait, SVN access and instructions can be found at http://rose.googlecode.com)
Fixed in 0.555, just uploaded to CPAN.