Allow an object to be deleted by unref even if it has a parent.

This simply hides the error message warning that an object being destroyed still has a parent. This property is false by default.

In a normal object use case, when ownership of an object is given to a caller, said ownership should be released with efl_unref(). If the object has a parent, this will print error messages, as efl_unref() is stealing the ref from the parent.

Use this function very carefully, unless you're absolutely sure of what you are doing.

Since 1.22


  • allow - Whether to allow efl_unref() to zero even if Efl.Object.parent is not null.


@property allow_parent_unref @beta {
    get {}
    set {}
    values {
        allow: bool (false);

C signature

Eina_Bool efl_allow_parent_unref_get(const Eo *obj);
void efl_allow_parent_unref_set(Eo *obj, Eina_Bool allow);

Implemented by