Closed medic123de closed 9 years ago
i think that the memory-leaks (see also #2) were introduced with version 0.3.x and obviously seem to be caused by the (freetype-)font-handling.
I hope, that Elisabeth or one of the other developers with high c# skills have some time to take a deeper look at this problem.
this should be fixed now
Hi, using php-fpm there seems to be a memory leak regarding FtFontFace
<?php $fontFile = "arial.ttf";
$surface = new \CairoImageSurface( CairoFormat::ARGB32, 750, 750 );
$context = new \CairoContext( $surface ); $fontFaceObject = new \CairoFtFontFace($fontFile);
// commenting next line will not leak $context->setFontFace( $fontFaceObject ); ?>
I found n-times the content of arial.ttf within allocated memory, where n equals number of requests.
therefore, the memory leak is directly related to sizeof($fontFaceObject) :-(