Skip Menu |

This queue is for tickets about the SVG CPAN distribution.

Report information
The Basics
Id: 54458
Status: resolved
Priority: 0/
Queue: SVG

People
Owner: Nobody in particular
Requestors: david.tulloh [...] AirservicesAustralia.com
Cc:
AdminCc:

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



Subject: Memory leaks
Date: Wed, 10 Feb 2010 10:40:31 +1100
To: <bug-SVG [...] rt.cpan.org>
From: "Tulloh, David" <david.tulloh [...] AirservicesAustralia.com>
The SVG object doesn't clean up after itself resulting in memory leaks as the program runs. Due to all the self references scattered through the tree the SVG object can't fall out of scope or be destroyed by being set to undef. (It is cleaned up when the script completes.) A destructor should be defined in the SVG class to allow Perl to destroy the object cleanly. I have attached a script that demonstrates the problem. It also includes workaround code that I have created, this code may not catch all references but seems to work for the SVG objects I am generating. Using: Perl v5.10.1 SVG 2.49 Debian Linux, kernel 2.6.32, running in a VM

Message body is not shown because sender requested not to inline it.

Hi David, Thank you for the bug report and patch. I added some weak references at strategic places in the SVG code (version 2.50). This "breaks" some circular references and prevents memory leaks. Florent