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.
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.)
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 :)
Created attachment 3867 [details] [review] the right version of the cairo-user-data patch Tastes great, less typos.
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.