Image_Graph and memory leaks
| From: | Brice Joly | Date: | Thu, 24 Mar 2005 14:27:06 +0000 |
| Subject: | Image_Graph and memory leaks | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18307@lists.php.net to get a copy of this message | ||
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.