Bug 11017

Summary: Memory leak by pattern cache
Product: cairo Reporter: Martin Horák <horakm>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED NOTABUG QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.4.6   
Hardware: All   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:

Description Martin Horák 2007-05-21 08:18:28 UTC
Hello,

after calling the following two function

cairo_create;
cairo_destroy;

I encountered a memory leak 136 bytes long. The memory is allocated by function _cairo_pattern_create_solid for new pattern and when I call cairo_destroy() allocated memory is not freed, but the pointer is stored to static variable solid_pattern_cache. Is there any function to explicitly erase the cache or is it a bug?

Regards,
Martin
Comment 1 Chris Wilson 2007-05-21 08:53:11 UTC
When performing leak checking, one can call cairo_debug_reset_static_data() but note the warnings in its documentation -- only call the function when you no longer hold any references to cairo objects.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.