discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=e7fcba8e8f120c770703fdc206343db6da2a3113

commit e7fcba8e8f120c770703fdc206343db6da2a3113
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Feb 5 16:31:47 2015 -0500

    clear wl pixmap cache on client free instead of leaking
---
 src/bin/e_pixmap.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 3d747d9..b411865 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -87,6 +87,14 @@ _e_pixmap_image_clear_x(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_U
 }
 #endif
 
+#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+static void
+_e_pixmap_image_clear_wl(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+   E_FREE_LIST(data, _e_pixmap_resource_free);
+}
+#endif
+
 static void
 _e_pixmap_free(E_Pixmap *cp)
 {
@@ -110,7 +118,9 @@ _e_pixmap_free(E_Pixmap *cp)
       case E_PIXMAP_TYPE_WL:
 #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
         if (!cp->resource_cache) break;
-        if (!cp->client)
+        if (cp->client)
+          evas_object_event_callback_add(cp->client->frame, 
EVAS_CALLBACK_FREE, _e_pixmap_image_clear_wl, cp->resource_cache);
+        else
           {
              void *i;
 

-- 


Reply via email to