This function finishes the surface and drops all references to
external resources. For example, for the Xlib backend it means
that cairo will no longer access the drawable, which can be freed.
After calling cairo.surface.Surface.finish the only valid operations on a
surface are checking status, getting and setting user, referencing
and destroying, and flushing and finishing it.
Further drawing to the surface will not affect the
surface but will instead trigger a cairo.types.Status.SurfaceFinished
error.
This function finishes the surface and drops all references to external resources. For example, for the Xlib backend it means that cairo will no longer access the drawable, which can be freed. After calling cairo.surface.Surface.finish the only valid operations on a surface are checking status, getting and setting user, referencing and destroying, and flushing and finishing it. Further drawing to the surface will not affect the surface but will instead trigger a cairo.types.Status.SurfaceFinished error.
When the last call to cairo.surface.Surface.destroy decreases the reference count to zero, cairo will call cairo.surface.Surface.finish if it hasn't been called already, before freeing the resources associated with the surface.