ickle at kemper.freedesktop.org
Thu Jun 14 15:17:17 PDT 2012
src/cairo-surface-subsurface.c | 6 ++++++
1 file changed, 6 insertions(+)
Author: Henry Song <henry.song at samsung.com>
Date: Thu Jun 14 23:07:34 2012 +0100
subsurface: Disable subsurface-set-snapshot as it creates a ref cycle
_cairo_surface_subsurface_set_snapshot () sets the subsurface as the
snapshot of its target. This creates a reference cycle (as the target
is already referenced by the surface) and thus a memory leak (assuming
the likely case that user doesn't call finish).
Test case: subsurface-similar-repeat.
So make this call as a no-op for the time being until the bug is fixed.
diff --git a/src/cairo-surface-subsurface.c b/src/cairo-surface-subsurface.c
index 90440c7..7ceef11 100644
@@ -557,6 +557,12 @@ _cairo_surface_subsurface_set_snapshot (cairo_surface_t *surface,
TRACE ((stderr, "%s: target=%d, snapshot=%d\n", __FUNCTION__,
+ /* FIXME: attaching the subsurface as a snapshot to its target creates
+ * a reference cycle. Let's make this call as a no-op until that bug
+ * is fixed.
More information about the cairo-commit