Scenario:
const char * accel = accel_get();
accel_set("gl:depth");
Now accel may not be valid anymore since the original
Eina_Stringshare might have been destroyed. So there was
no point in saving the const char * pointer. It was not valid
after the call to set(). This is a bit confusing here. Returning
char* would be clear: the caller would own the data.
gldata_init(gld);
// add a Z-depth buffer to the window and try to use GL
- accel = elm_config_accel_preference_get();
+ accel = eina_stringshare_add(elm_config_accel_preference_get());
elm_config_accel_preference_set("gl:depth");
// new window - do the usual and give it a name, title and delete handler
// restore previous accel preference
elm_config_accel_preference_set(accel);
+ eina_stringshare_del(accel);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);