eo: unref compensate is not requires here
this check caused a leaked reference. Eo objects are having two reference counters a internal and external one. The external one can be manipulated via efl_ref / efl_unref. The internal one can be manipulated via _efl_ref _efl_unref. The external reference counter is keeping a internal reference by the time the external counter is > 0. When the external counter reaches == 0 this internal reference is given up with the _efl_unref call in eo.c:1928. However, checking unref_compensate in the block in line 1950 leads that to the leak that this internal reference is not given up at the pointer user_refcount reaches exactly 0. This check also does not prevent anything, the object is kept alive anywayys as the efl_unref method keeps its private internal reference. This lead to leaks in efl_device_* classes, parts have not been destructed correctly. Differential Revision: https://phab.enlightenment.org/D6252
This commit is contained in:
parent
590b52ce75
commit
7e72a93283
|
@ -1912,7 +1912,7 @@ efl_unref(const Eo *obj_id)
|
|||
#ifdef EO_DEBUG
|
||||
_eo_log_obj_ref_op(obj, EO_REF_OP_UNREF);
|
||||
#endif
|
||||
if (EINA_UNLIKELY((obj->user_refcount <= 0 && !obj->unref_compensate)))
|
||||
if (EINA_UNLIKELY((obj->user_refcount <= 0)))
|
||||
{
|
||||
if (obj->user_refcount < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue