Skip Menu |
 

This queue is for tickets about the DBD-XBase CPAN distribution.

Report information
The Basics
Id: 70807
Status: new
Priority: 0/
Queue: DBD-XBase

People
Owner: Nobody in particular
Requestors: serg_56 [...] mail.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.02
Fixed in: (no value)



Subject: Memory Leak in module XBase takes place
#Memory Leak in module XBase takes place. #Object XBase::IndexCursor from package XBase::IndexCursor #in file XBase.pm #Example code use strict; use XBase; my $fd='c:/foo.dbf'; my $fi='c:/foo.cdx'; my $table =XBase->new($fd) or die XBase->errstr; my ($k,$cursor); while($k<99999){ $cursor = $table->prepare_select_with_index([$fi, "KEY"]); sleep 1; print "$k\n"; $k++; } exit; XBase version 1.02 ActivePerl This is perl 5, version 14, subversion 1 (v5.14.1) built for MSWin32- x86-multi-thread Similar result for other versions ActivePerl - 5.8.9, 5.12.4 OS - WindowsXP SP3 Professional Possibly problem that object XBase::IndexCursor contains references to hashes. I suggest to add a method close for class XBase::IndexCursor sub close { my $self = shift; for (keys %{$self->[4]}){ delete $self->[4]->{"$_"}; } } #Example new code use strict; use XBase; my $fd='c:/foo.dbf'; my $fi='c:/foo.cdx'; my $table =XBase->new($fd) or die XBase->errstr; my ($k,$cursor); while($k<99999){ $cursor = $table->prepare_select_with_index([$fi, "KEY"]); $cursor->close; sleep 1; print "$k\n"; $k++; } exit;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.