Bug 11059

Summary: Leak caused by quartz not implementing release_source_image
Product: cairo Reporter: Brian Ewins <Brian.Ewins>
Component: quartz backendAssignee: Vladimir Vukicevic <vladimir>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.4.7   
Hardware: All   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:

Description Brian Ewins 2007-05-24 15:41:58 UTC
Originally reported by Boris Zbarsky on the list:
"The image surface that _cairo_quartz_surface_acquire_source_image creates never
seems to be released, probably because there is no release_source_image callback
in the quartz code.

The attached patch fixes that problem, at least insofar as the image surface
itself is no longer leaking.  I'm not sure whether any other cleanup needs to
happen here."

To reproduce, change test/source-pattern.c to #include "cairo-quartz.h", then replace the call to cairo_image_surface_create with a call to cairo_quartz_surface_create. Wrap all the code of the test in while(1) and monitor the memory of the process when you run the test.

Boris' patch is obviously correct, and applying it the leak disappears. Just recording the issue here for the benefit of the log, I'll close the bug in a moment or two.
Comment 1 Brian Ewins 2007-05-24 15:55:07 UTC
Patch applied in fcdfda83655faf0eecbb2b5af09a05340fe422e6

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.