summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-11-20 11:52:16 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-11-20 11:52:16 +0000
commitf90641200b543798bf93b981d1b7f5b943f569d2 (patch)
tree80a60bb0724f962353da15b7974c01c7162c0dfd
parent6824e47c4b850eac9aa589061a6daed533eee6b2 (diff)
evas - fix the memory leak - eina_rectangles allocated for clip_changes.
SVN revision: 79469
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/evas/canvas/evas_render.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 05977ad8f0..b67f495363 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,3 +80,7 @@
80 80
81 * Fix EINA_INLIST_FOREACH_SAFE macro to work when inlist is not the 81 * Fix EINA_INLIST_FOREACH_SAFE macro to work when inlist is not the
82 first item in the struct. 82 first item in the struct.
83
842012-11-20 ChunEon Park <hermet@hermet.pe.kr>
85
86 * Fix the evas memory leak - eina_rectangles allocated internally.
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 9762dda943..f5b3bda236 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -125,6 +125,13 @@ _canvas_obscured_clear(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list EINA_UNUSE
125} 125}
126 126
127static Eina_Bool 127static Eina_Bool
128_evas_clip_changes_free(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUSED)
129{
130 eina_rectangle_free(data);
131 return EINA_TRUE;
132}
133
134static Eina_Bool
128_evas_render_had_map(Evas_Object_Protected_Data *obj) 135_evas_render_had_map(Evas_Object_Protected_Data *obj)
129{ 136{
130 return ((obj->prev.map) && (obj->prev.usemap)); 137 return ((obj->prev.map) && (obj->prev.usemap));
@@ -1743,6 +1750,7 @@ evas_render_updates_internal(Evas *eo_e,
1743 eina_array_clean(&e->render_objects); 1750 eina_array_clean(&e->render_objects);
1744 eina_array_clean(&e->restack_objects); 1751 eina_array_clean(&e->restack_objects);
1745 eina_array_clean(&e->temporary_objects); 1752 eina_array_clean(&e->temporary_objects);
1753 eina_array_foreach(&e->clip_changes, _evas_clip_changes_free, NULL);
1746 eina_array_clean(&e->clip_changes); 1754 eina_array_clean(&e->clip_changes);
1747/* we should flush here and have a mempool system for this 1755/* we should flush here and have a mempool system for this
1748 eina_array_flush(&e->active_objects); 1756 eina_array_flush(&e->active_objects);
@@ -1860,6 +1868,7 @@ _canvas_render_idle_flush(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED)
1860 eina_array_flush(&e->delete_objects); 1868 eina_array_flush(&e->delete_objects);
1861 eina_array_flush(&e->obscuring_objects); 1869 eina_array_flush(&e->obscuring_objects);
1862 eina_array_flush(&e->temporary_objects); 1870 eina_array_flush(&e->temporary_objects);
1871 eina_array_foreach(&e->clip_changes, _evas_clip_changes_free, NULL);
1863 eina_array_flush(&e->clip_changes); 1872 eina_array_flush(&e->clip_changes);
1864 1873
1865 e->invalidate = EINA_TRUE; 1874 e->invalidate = EINA_TRUE;