You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In BaseWidget.onCloseRequested() we invoke the dispose() method in the widget. I believe this is wrong, due to the argument in #12093 (comment):
when a client invokes ApplicationShell.addWidget(), it can pass widgets which are not derived from BaseWidget. When we later call ApplicationShell.closeWidget() on that widget, we should invoke dispose() on the widget after calling close() on it, since we do not know that close() invokes dispose(). Currently, any widget that does not dispose itself upon close() will go undisposed and might leak resources. However, calling dispose() on a BaseWidget after it is close will double-dispose and throw an error.
The clients managing the widget lifecycle should be reponsible for disposing of the widgets, not the widget itself.
The text was updated successfully, but these errors were encountered:
Feature Description:
In
BaseWidget.onCloseRequested()
we invoke thedispose()
method in the widget. I believe this is wrong, due to the argument in #12093 (comment):The clients managing the widget lifecycle should be reponsible for disposing of the widgets, not the widget itself.
The text was updated successfully, but these errors were encountered: