summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-10-17 14:08:32 +0900
committerHermet Park <hermetpark@gmail.com>2018-10-17 14:08:32 +0900
commitedab8f44a44bde2b1c66a568f5d5cd9c75122663 (patch)
treee73e0794285f21d5090d78ec98993c78605170d7
parent97e71b9dc4fa73da99a890d9c39d6617e529dc94 (diff)
evas vg: fix memory leak at gradient.
Summary: free memory properly when object is deleted. @fix Reviewers: #committers, devilhorns Reviewed By: #committers, devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7165
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient.eo1
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient.eo b/src/lib/evas/canvas/efl_canvas_vg_gradient.eo
index 944b5f21a7..76502c826d 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient.eo
@@ -7,5 +7,6 @@ abstract Efl.Canvas.Vg.Gradient (Efl.Canvas.Vg.Node, Efl.Gfx.Gradient)
7 Efl.Gfx.Gradient.spread { get; set; } 7 Efl.Gfx.Gradient.spread { get; set; }
8 Efl.Gfx.Path.interpolate; 8 Efl.Gfx.Path.interpolate;
9 Efl.Duplicate.duplicate; 9 Efl.Duplicate.duplicate;
10 Efl.Object.destructor;
10 } 11 }
11} 12}
diff --git a/src/lib/evas/canvas/evas_vg_gradient.c b/src/lib/evas/canvas/evas_vg_gradient.c
index b55f3c31a8..888c478582 100644
--- a/src/lib/evas/canvas/evas_vg_gradient.c
+++ b/src/lib/evas/canvas/evas_vg_gradient.c
@@ -96,6 +96,15 @@ _efl_canvas_vg_gradient_efl_gfx_path_interpolate(Eo *obj,
96 return EINA_TRUE; 96 return EINA_TRUE;
97} 97}
98 98
99static void
100_efl_canvas_vg_gradient_efl_object_destructor(Eo *obj, Efl_Canvas_Vg_Gradient_Data *pd)
101{
102 if (pd->colors) free(pd->colors);
103
104 efl_destructor(efl_super(obj, MY_CLASS));
105}
106
107
99EOLIAN static Efl_VG * 108EOLIAN static Efl_VG *
100_efl_canvas_vg_gradient_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Gradient_Data *pd) 109_efl_canvas_vg_gradient_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Gradient_Data *pd)
101 110