alibaba / alibaba/flutter_boost

App根控制器在原生和Flutter页面直接来回切换时,flutter页面未释放,造成内存泄漏,导致崩溃。

Open
#1,534 3 comments 0 reactions 0 assignees View on GitHub
in triage waiting for customer response
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

您好,遇到的问题如题。
具体细节如下:
项目中集成了flutter_boost 'v3.0-null-safety-preview.16'版本,登录页面用flutter实现,原生用embedded的形式嵌入该flutter页面,将此flutter页面指定为App的根控制器,页面有登录按钮,登录成功,进入App主界面,此时切换了根控制器为原生页面,我的页面有退出登录按钮,点击退出登录按钮,实例化一个新的flutter登录页面,指定为APP的根控制器。在切换的过程中发现包裹flutter页面的原生控制器已经释放,但是flutter登录页面,并未释放,造成内存泄漏(两侧监听均以解除),暴力切换几十次后App崩溃。尝试着调用了[[FlutterBoost instance] close:uniqueId],页面也并未释放,这种情况,要怎么才能让这个flutter登录页面释放呢?谢谢。

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce repeated root-controller switches between the embedded Flutter login page and the native main page, focusing on [[FlutterBoost instance] close:uniqueId]. Done means each prior Flutter login page is released and repeated switches no longer show memory growth or cause a crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.