-
Notifications
You must be signed in to change notification settings - Fork 69
ElmFlutterView: Destory view instance #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ElmFlutterView: Destory view instance #381
Conversation
embedding/cpp/elm_flutter_view.cc
Outdated
| } | ||
|
|
||
| evas_object_event_callback_add( | ||
| evas_object_, EVAS_CALLBACK_DEL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When does the object get deleted? By who?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
evas_object_ is deleted when parent_ is deleted.
This deletion is process by Eo of EFL. (ElmFlutterView always needs a valid evas object (parent).)
Of course, if the user deletes FlutterView, I think that another engine problem(crash?) may occur.
I am considering several cases.
b48f36a to
7e8769b
Compare
|
Q. If the container created inside the view is deleted by some factor of outside, and the view know that event through the callback, should the state of the view be considered valid? +) Should |
7e8769b to
4eadf71
Compare
c3f7e84 to
b68d257
Compare
embedding/cpp/elm_flutter_view.cc
Outdated
| [](void *data, Evas *evas, Evas_Object *object, void *event_info) { | ||
| auto engine = reinterpret_cast<FlutterDesktopEngineRef>(data); | ||
| if (engine) { | ||
| FlutterDesktopEngineShutdown(engine); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be updated based on flutter-tizen/engine#310.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to add view_ destroy call to the destructor.
When ElmFlutterView is deleted, view_ is no longer used, so destory it.
b68d257 to
3d9d671
Compare
|
|
When ElmFlutterView is deleted, view_ is no longer used, so destory it.