Skip Menu |
 

This queue is for tickets about the Imager-Screenshot CPAN distribution.

Report information
The Basics
Id: 24992
Status: resolved
Priority: 0/
Queue: Imager-Screenshot

People
Owner: Nobody in particular
Requestors: gefek [...] interia.pl
Cc:
AdminCc:

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



Subject: Imager::Screenshot - doesn't free image memory
Download (untitled) / with headers
text/plain 313b
With "$img = screenshot(display=>$disp)" memory for the $img is not freed. I have to run "$img->DESTROY()" to have no memory leaks. In the documentation there is no information about this, so I suppose it is not the right behavior. Tested on Debian 3.1 with perl 5.8.4, Imager v0.55 and Imager::Screenshot v0.004.
Download (untitled) / with headers
text/plain 778b
On Fri Feb 16 07:18:49 2007, AzMoDaN wrote: Show quoted text
> With "$img = screenshot(display=>$disp)" memory for the $img is not freed. > I have to run "$img->DESTROY()" to have no memory leaks. In the > documentation there is no information about this, so I suppose it is not > the right behavior. > Tested on Debian 3.1 with perl 5.8.4, Imager v0.55 and > Imager::Screenshot v0.004.
Sorry for the delay in replying to this, I don't seem to have received this ticket in email. The image data should be released once the image object goes out of scope. I'm not sure how calling $img->DESTROY() would release any memory, any memory released by that should also be released by the object going out of scope. There is definitely a memory leak, I'll look into it. Thanks for the report. Tony
Download (untitled) / with headers
text/plain 615b
On Fri Feb 16 07:18:49 2007, AzMoDaN wrote: Show quoted text
> With "$img = screenshot(display=>$disp)" memory for the $img is not freed. > I have to run "$img->DESTROY()" to have no memory leaks. In the > documentation there is no information about this, so I suppose it is not > the right behavior. > Tested on Debian 3.1 with perl 5.8.4, Imager v0.55 and > Imager::Screenshot v0.004.
This turned out to be a bug in Imager's typemap. I've released Imager::Screenshot 0.005 which avoids this bug. I've modified Imager's typemap, which will fix the base problem in the next release of Imager, which will be soon, hopefully. Tony


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.