Bug 5082

Summary: all ref counted types need lifecycle information
Product: cairo Reporter: Larry Ewing <lewing>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: enhancement    
Priority: high    
Version: 1.1.1   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: cairo-user-data.patch
the right version of the cairo-user-data patch

Description Larry Ewing 2005-11-18 05:09:22 UTC
of the 5 refcounted types in cairo only cairo_surface_t and cairo_font_face_t have 
set_user_data and on cairo_surface_t has finish.  It would make language
bindings much more robust if they could also track the lifetime of the other 3
types using one of those methods.
Comment 1 Vladimir Vukicevic 2005-11-22 09:33:25 UTC
Created attachment 3866 [details] [review]
cairo-user-data.patch

This patch adds user data to cairo_t -- just user data; adding finish() would
require more work (checking whether the cairo_t is finished in all the public
APIs).	Is finish() worth it for cairo_t?  (I'd have it just basically destroy
the gstate and have the gstate == NULL case mean that it's finished.)
Comment 2 Vladimir Vukicevic 2005-11-22 09:34:09 UTC
Ugh, ignore the first two bits in that patch (though they should go in anyway,
just some compilation cleanup stuff).. I attached the patch before saving my
buffer where I was editing it :)
Comment 3 Vladimir Vukicevic 2005-11-22 09:40:46 UTC
Created attachment 3867 [details] [review]
the right version of the cairo-user-data patch

Tastes great, less typos.
Comment 4 Chris Wilson 2008-10-10 15:17:12 UTC
Has been applied as is quite some time ago.

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.