Re: Image_Graph and memory leaks

From: Date: Thu, 24 Mar 2005 19:04:29 +0000
Subject: Re: Image_Graph and memory leaks
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18315@lists.php.net to get a copy of this message
Thanks for the report on your findings. This is definitely a mistake because of course the ImageDestroy() should be there (and it was once, but probably got lost when drivers were introduced). Regarding the other memory leak, I have an idea on what that could be (something similar) and I have fixed both in the current CVS version. PS. This is _not_ the right place for bugs for alpha packages, they should also be reported in the bug-tracker system. I would like it if you'd open a bug report there (for others and future reference)... Thanks /Jesper Brice Joly wrote:
Image_Graph is a very promising package, though still alpha. I tested it and found out it has several memory leaks, one of which is a big stopper : GD Image object isn't destroyed, which leads to some 8MB memory per image that can never be freed (on the testing system). Adding ImageDestroy($this->_canvas); in Graph/Driver/GD/PNG.php will deal with that (probably not the best place to add it but since I'm only using png I went straight there). Unfortunately there's another 300KB memory leak, which I wasn't able to track down. Since the allocated memory is never freed, using Image_Graph for massive diagram generation is nearly impossible. Hints welcome if anyone had some success tracking this one or some clue as to where to look for that -hopefully- last leak. Regards, Brice Joly PS:I'm not sure bugs for alpha packages should be reported here, please point me to the right place if this isn't.


« previous php.pear.general (#18315) next »