Skip to content
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

页面关闭后adapter未销毁? #481

Open
XHL-study opened this issue Sep 25, 2019 · 2 comments
Open

页面关闭后adapter未销毁? #481

XHL-study opened this issue Sep 25, 2019 · 2 comments

Comments

@XHL-study
Copy link

XHL-study commented Sep 25, 2019

1.页面关闭后adapter并没有被销毁,是我用法的问题吗。
2.我初始化的2000行数据,可以看到我没有做任何操作,i和j都在疯狂增长,
初始化20000行数据卡顿很明显。

final imgList = [
    "https://axure-file.lanhuapp.com/51d4ee7f-3a52-4abc-858b-1e4830d8a449__971f2b133fbcfdbb0d2a46bacb9ded46",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-001.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-002.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-003.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-005.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-006.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-007.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-008.jpg",
    "https://img.ivsky.com/img/tupian/pre/201901/25/shanyang-009.jpg",
  ];
  final List<NormalComponentState> list = List.generate(2000, (int index) {
    return NormalComponentState(
      id: "id_$index",
      icon: imgList[Random().nextInt(imgList.length) % imgList.length],
      introduction: "测试demo",
      title: "test$index",
      type: 0,
      date: "2019-09-23 14:07",
    );
  });
  ctx.dispatch(ListActionCreator.initData(list));

中间暂停了两次gif录制,期间没有做任何页面操作。
fluter_bug

@zjuwjf
Copy link
Contributor

zjuwjf commented Sep 25, 2019

在这样的使用场景下 确认下是flutter的问题还是adapter的问题?

@XHL-study
Copy link
Author

在这样的使用场景下 确认下是flutter的问题还是adapter的问题?

嗯,我不确定,在学习使用这个。
这是我的demo
https://github.com/XHL-study/fish_redux_demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants