[PR #3995] [MERGED] fix: memory leaks #5992

Closed
opened 2026-03-23 22:21:14 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3995
Author: @LucasXu0
Created: 11/23/2023
Status: Merged
Merged: 11/26/2023
Merged by: @appflowy

Base: mainHead: fix_memory_leak


📝 Commits (7)

  • bf86666 feat: add memory leak monitor
  • 011a968 fix: memory leaks
  • 31a46d3 Merge branch 'main' into fix_memory_leak
  • 758b395 feat: dump call stack in memory leak detector
  • 28f025a chore: disable memory leak detector
  • 3c17693 Merge branch 'main' into fix_memory_leak
  • 6922fc4 Merge remote-tracking branch 'origin/main' into fix_memory_leak

📊 Changes

17 files changed (+223 additions, -60 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/base/emoji/emoji_search_bar.dart (+6 -0)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_editor_bloc.dart (+6 -5)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_data_controller.dart (+7 -3)
📝 frontend/appflowy_flutter/lib/plugins/database_view/board/presentation/board_page.dart (+18 -8)
📝 frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/header/field_editor.dart (+2 -1)
📝 frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/row/row.dart (+3 -4)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart (+37 -17)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/card_cell.dart (+3 -6)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cell_builder.dart (+5 -1)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/text_cell/text_cell.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart (+9 -7)
📝 frontend/appflowy_flutter/lib/startup/startup.dart (+4 -0)
frontend/appflowy_flutter/lib/startup/tasks/memory_leak_detector.dart (+97 -0)
📝 frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart (+7 -1)
📝 frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart (+7 -7)
📝 frontend/appflowy_flutter/pubspec.lock (+8 -0)
📝 frontend/appflowy_flutter/pubspec.yaml (+1 -0)

📄 Description

Feature Preview

  • use leak_tracker to detect not disposed objects
  • dispose the leaked objects

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/3995 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 11/23/2023 **Status:** ✅ Merged **Merged:** 11/26/2023 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `fix_memory_leak` --- ### 📝 Commits (7) - [`bf86666`](https://github.com/AppFlowy-IO/AppFlowy/commit/bf8666683b4161b9d110210e72068c0ce6c9315f) feat: add memory leak monitor - [`011a968`](https://github.com/AppFlowy-IO/AppFlowy/commit/011a968d5f88771c3f7e4579bccb38b66438d52a) fix: memory leaks - [`31a46d3`](https://github.com/AppFlowy-IO/AppFlowy/commit/31a46d37c82d70c5731b5db80bb51cdafa20f320) Merge branch 'main' into fix_memory_leak - [`758b395`](https://github.com/AppFlowy-IO/AppFlowy/commit/758b39529295d0f5ad395b5e11240a1486f66a89) feat: dump call stack in memory leak detector - [`28f025a`](https://github.com/AppFlowy-IO/AppFlowy/commit/28f025a9e6a873595a01dd06abb976ce14d9d599) chore: disable memory leak detector - [`3c17693`](https://github.com/AppFlowy-IO/AppFlowy/commit/3c1769346245034376d7229ddcd83db90a587408) Merge branch 'main' into fix_memory_leak - [`6922fc4`](https://github.com/AppFlowy-IO/AppFlowy/commit/6922fc4917c6a3d5996c0656aafd86d363578659) Merge remote-tracking branch 'origin/main' into fix_memory_leak ### 📊 Changes **17 files changed** (+223 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/base/emoji/emoji_search_bar.dart` (+6 -0) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_editor_bloc.dart` (+6 -5) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_data_controller.dart` (+7 -3) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/board/presentation/board_page.dart` (+18 -8) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/header/field_editor.dart` (+2 -1) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/row/row.dart` (+3 -4) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart` (+37 -17) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/card_cell.dart` (+3 -6) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cell_builder.dart` (+5 -1) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/text_cell/text_cell.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart` (+9 -7) 📝 `frontend/appflowy_flutter/lib/startup/startup.dart` (+4 -0) ➕ `frontend/appflowy_flutter/lib/startup/tasks/memory_leak_detector.dart` (+97 -0) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart` (+7 -1) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart` (+7 -7) 📝 `frontend/appflowy_flutter/pubspec.lock` (+8 -0) 📝 `frontend/appflowy_flutter/pubspec.yaml` (+1 -0) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview - use leak_tracker to detect not disposed objects - dispose the leaked objects <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:21:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#5992
No description provided.