alibaba / flutter_boost

FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts
https://github.com/alibaba/flutter_boost
MIT License
6.98k stars 1.23k forks source link

已经pause的页面destroy后没有调用dispose #866

Open codeCacher opened 4 years ago

codeCacher commented 4 years ago

Steps to Reproduce

A small application to reproduce the bug(最小化可复现的demo)

  1. 把demo的MainActivity启动模式改为singleTask
  2. NativePageActivity 的点击事件处理改为打开MainActivity
  3. simple_page_widgets.dart中_FlutterRouteWidgetState增加initState和dispose方法,打印日志
  4. 安装demo,依次open flutter page->open native page->open native page
  5. 查看日志,只打印了initState,没有打印dispose,而这个时候flutter页面其实已经不在了
  6. 重新打开flutter页面发现打印日志initState dispose

Flutter Boost Version: 1.12.13+3 Target Platform: Android Target OS version/browser: 8.1.0 Devices: PIXEL

Logs

add your crash log or something else.

// 1-5步骤打印日志
I/flutter (25896): flutterboost:initState

// 6步骤打印日志
I/flutter (25896): flutterboost:initState
I/flutter (25896): flutterboost:dispose
Ice0419 commented 3 years ago

@codeCacher 请问现在解决了吗 我也遇到了同样问题

yahooyee commented 2 years ago

同问,遇到一样的问题