{"action":"created","issue":{"url":"https://api.github.com/repos/gtkforphp/cairo/issues/13","labels_url":"https://api.github.com/repos/gtkforphp/cairo/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/gtkforphp/cairo/issues/13/comments","events_url":"https://api.github.com/repos/gtkforphp/cairo/issues/13/events","html_url":"https://github.com/gtkforphp/cairo/issues/13","id":56659227,"number":13,"title":"memory leak with v0.3.2 ","user":{"login":"medic123de","id":7592498,"avatar_url":"https://avatars.githubusercontent.com/u/7592498?v=3","gravatar_id":"","url":"https://api.github.com/users/medic123de","html_url":"https://github.com/medic123de","followers_url":"https://api.github.com/users/medic123de/followers","following_url":"https://api.github.com/users/medic123de/following{/other_user}","gists_url":"https://api.github.com/users/medic123de/gists{/gist_id}","starred_url":"https://api.github.com/users/medic123de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic123de/subscriptions","organizations_url":"https://api.github.com/users/medic123de/orgs","repos_url":"https://api.github.com/users/medic123de/repos","events_url":"https://api.github.com/users/medic123de/events{/privacy}","received_events_url":"https://api.github.com/users/medic123de/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-05T11:37:53Z","updated_at":"2015-02-05T19:00:26Z","closed_at":null,"body":"Hi,\r\nusing php-fpm there seems to be a memory leak regarding FtFontFace\r\n\r\n<?php\r\n$fontFile = \"arial.ttf\";\r\n\r\n$surface = new \\CairoImageSurface(\r\n    CairoFormat::ARGB32,\r\n    750,\r\n    750\r\n);\r\n\r\n$context = new \\CairoContext( $surface );\r\n$fontFaceObject = new \\CairoFtFontFace($fontFile);\r\n\r\n// commenting next line will not leak\r\n$context->setFontFace( $fontFaceObject );\r\n?>\r\n\r\nI found  n-times the content of arial.ttf within allocated memory, where n equals number of requests.\r\n\r\ntherefore, the memory leak is directly related to sizeof($fontFaceObject)   :-("},"comment":{"url":"https://api.github.com/repos/gtkforphp/cairo/issues/comments/73104973","html_url":"https://github.com/gtkforphp/cairo/issues/13#issuecomment-73104973","issue_url":"https://api.github.com/repos/gtkforphp/cairo/issues/13","id":73104973,"user":{"login":"medic123de","id":7592498,"avatar_url":"https://avatars.githubusercontent.com/u/7592498?v=3","gravatar_id":"","url":"https://api.github.com/users/medic123de","html_url":"https://github.com/medic123de","followers_url":"https://api.github.com/users/medic123de/followers","following_url":"https://api.github.com/users/medic123de/following{/other_user}","gists_url":"https://api.github.com/users/medic123de/gists{/gist_id}","starred_url":"https://api.github.com/users/medic123de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic123de/subscriptions","organizations_url":"https://api.github.com/users/medic123de/orgs","repos_url":"https://api.github.com/users/medic123de/repos","events_url":"https://api.github.com/users/medic123de/events{/privacy}","received_events_url":"https://api.github.com/users/medic123de/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T19:00:26Z","updated_at":"2015-02-05T19:00:26Z","body":"https://github.com/gtkforphp/cairo/pull/15  works for me."}}