Re: Destroy a cairo_surface_t with bad status
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 20, 2013 at 07:55:24PM +0200, Carlos López González wrote: > Hi! > When I request a cairo_surface_t* (say reading png from filename) and its > status is not null (i.e. file doesn't exists), how should I destroy the > bad status surface? > > Is it ok to do not destroy it and just leave the system take care of the > stored pointer? You treat it as a normal surface and so should call cairo_surface_destroy() once you are finished with it. Only the surfaces that in an error state from creation are static, if an error is raised later it will require the normal cleanup. -Chris -- Chris Wilson, Intel Open Source Technology Centre -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo