A tvg picture is created twice - by efl and by tvg.
The object created by efl has to be deleted in order
to prevent memory the leaks.
Change-Id: I74629c8cb8ea47e476e102cefcb45ee571837856
node = efl_duplicate(efl_super(obj, MY_CLASS));
sd = efl_data_scope_get(node, MY_CLASS);
- if (pd->picture) sd->picture = tvg_paint_duplicate(pd->picture);
+ // TIZEN_ONLY(20220330): fix memleak during a picture duplication
+ if (pd->picture)
+ {
+ if (sd->picture) tvg_paint_del(sd->picture);
+ sd->picture = tvg_paint_duplicate(pd->picture);
+ }
sd->image = pd->image; // note: no memcpy here
sd->w = pd->w;