frees the object handle when a OpenVG
is destroyed.
Signed-off-by: Andreas Pokorny <andreas.pokorny@elektrobit.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
vg_context_remove_object(ctx, &layer->base);
pipe_sampler_view_reference(&layer->sampler_view, NULL);
+ vg_free_object(&layer->base);
FREE(layer);
}
pipe_sampler_view_reference(&paint->gradient.sampler_view, NULL);
if (paint->pattern.sampler_view)
pipe_sampler_view_reference(&paint->pattern.sampler_view, NULL);
- if (ctx)
+ if (ctx) {
vg_context_remove_object(ctx, &paint->base);
+ vg_free_object(&paint->base);
+ }
free(paint->gradient.ramp_stopsi);
free(paint->gradient.ramp_stops);
if (p->stroked.path)
path_destroy(p->stroked.path);
+ vg_free_object(&p->base);
+
FREE(p);
}
}
cso_hash_delete(font->glyphs);
+ vg_free_object(&font->base);
+
FREE(font);
}