(In reply to alexander :surkov from comment #19)
> this means a caching, no? Internally we don't keep calculated name, we
> always calculated it on demand. Why would we need to keep accessible->name
> updated and how we are going to do that if we don't use atk_object_set_name?
Just use obj->name = xxx
And we saved g_strdup() here.
>
> > We need to copy the string to gchar* anyway.
>
> yep, just copy the string every time when we were asked. Doesn't sound good?
Actually it's not possible.
atk_object_get_name() returns const gchar*, caller will not free the return value.
We have to keep it somewhere in AtkObject, otherwise we leak.
Another benefit is we can easier see what the atk object was in gdb/dbx.
(In reply to alexander :surkov from comment #19) set_name?
> this means a caching, no? Internally we don't keep calculated name, we
> always calculated it on demand. Why would we need to keep accessible->name
> updated and how we are going to do that if we don't use atk_object_
Just use obj->name = xxx
And we saved g_strdup() here.
>
> > We need to copy the string to gchar* anyway.
>
> yep, just copy the string every time when we were asked. Doesn't sound good?
Actually it's not possible. get_name( ) returns const gchar*, caller will not free the return value.
atk_object_
We have to keep it somewhere in AtkObject, otherwise we leak.
Another benefit is we can easier see what the atk object was in gdb/dbx.