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

fix: memory leaks #615

Merged
merged 1 commit into from
Dec 8, 2023
Merged

fix: memory leaks #615

merged 1 commit into from
Dec 8, 2023

Conversation

LucasXu0
Copy link
Collaborator

@LucasXu0 LucasXu0 commented Dec 8, 2023


Exited.
Connecting to VM Service at ws://127.0.0.1:57561/r0eLDWkA74I=/ws

✓ memory leak
Node => package:flutter/foundation.dart/ChangeNotifier
#58     _RegisteredElement.mount (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/element_registry.dart:68:11)
#114    UnboundedRenderViewport._attemptLayout (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/viewport.dart:269:12)
#115    UnboundedRenderViewport.performLayout (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/viewport.dart:163:20)
#170    _RenderTheatre.performLayout (package:appflowy_editor/src/flutter/overlay.dart:797:15)
-------------------------------------------------------------------------------
ValueNotifier<Set<Element>?> => package:flutter/foundation.dart/ChangeNotifier
#11     new _PositionedListState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/positioned_list.dart:138:30)
#12     PositionedList.createState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/positioned_list.dart:132:42)
#30     _PostMountCallbackElement.mount (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/post_mount_callback.dart:30:11)
#62     _RenderTheatre.performLayout (package:appflowy_editor/src/flutter/overlay.dart:797:15)
-------------------------------------------------------------------------------
ScrollController => package:flutter/foundation.dart/ChangeNotifier
#11     new _ListDisplayDetails (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:687:28)
#12     new _ScrollablePositionedListState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:324:19)
#13     ScrollablePositionedList.createState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:183:42)
-------------------------------------------------------------------------------
ValueNotifier<Iterable<ItemPosition>> => package:flutter/foundation.dart/ChangeNotifier
#11     new ItemPositionsNotifier (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/item_positions_notifier.dart:12:63)
#12     new _ListDisplayDetails (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:686:33)
#13     new _ScrollablePositionedListState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:324:19)
#14     ScrollablePositionedList.createState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:183:42)
-------------------------------------------------------------------------------
ScrollController => package:flutter/foundation.dart/ChangeNotifier
#11     new _ListDisplayDetails (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:687:28)
#12     new _ScrollablePositionedListState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:320:17)
#13     ScrollablePositionedList.createState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:183:42)
-------------------------------------------------------------------------------
ValueNotifier<Iterable<ItemPosition>> => package:flutter/foundation.dart/ChangeNotifier
#11     new ItemPositionsNotifier (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/item_positions_notifier.dart:12:63)
#12     new _ListDisplayDetails (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:686:33)
#13     new _ScrollablePositionedListState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:320:17)
#14     ScrollablePositionedList.createState (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/scrollable_positioned_list.dart:183:42)
-------------------------------------------------------------------------------
Node => package:flutter/foundation.dart/ChangeNotifier

-------------------------------------------------------------------------------
ValueNotifier<Selection?> => package:flutter/foundation.dart/ChangeNotifier
#11     new _DesktopSelectionServiceWidgetState (package:appflowy_editor/src/editor/editor_component/service/selection/desktop_selection_service.dart:40:48)
#12     DesktopSelectionServiceWidget.createState (package:appflowy_editor/src/editor/editor_component/service/selection/desktop_selection_service.dart:26:7)
-------------------------------------------------------------------------------
_RestorableScrollOffset => package:flutter/foundation.dart/ChangeNotifier
#14     _AutoScrollableWidgetState.build (package:appflowy_editor/src/editor/editor_component/service/scroll/auto_scrollable_widget.dart:34:24)
-------------------------------------------------------------------------------
ScrollController => package:flutter/foundation.dart/ChangeNotifier
#11     _ScrollServiceWidgetState.scrollController (package:appflowy_editor/src/editor/editor_component/service/scroll_service_widget.dart:34:44)
#12     _ScrollServiceWidgetState.scrollController (package:appflowy_editor/src/editor/editor_component/service/scroll_service_widget.dart)
#13     _ScrollServiceWidgetState.build (package:appflowy_editor/src/editor/editor_component/service/scroll_service_widget.dart:55:27)
-------------------------------------------------------------------------------
PropertyValueNotifier<Selection?> => package:flutter/foundation.dart/ChangeNotifier
#11     _ScrollServiceWidgetState.initState (package:appflowy_editor/src/editor/editor_component/service/scroll_service_widget.dart:41:35)
-------------------------------------------------------------------------------
ValueNotifier<Iterable<ItemPosition>> => package:flutter/foundation.dart/ChangeNotifier
#11     new ItemPositionsNotifier (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/item_positions_notifier.dart:12:63)
#12     new ItemPositionsListener.create (package:appflowy_editor/src/flutter/scrollable_positioned_list/src/item_positions_listener.dart:15:45)
#13     new EditorScrollController (package:appflowy_editor/src/editor/editor_component/service/scroll/editor_scroll_controller.dart:121:29)
#14     _AppFlowyEditorState.initState (package:appflowy_editor/src/editor/editor_component/service/editor.dart:176:9)
-------------------------------------------------------------------------------
ValueNotifier<(int, int)> => package:flutter/foundation.dart/ChangeNotifier
#11     new EditorScrollController (package:appflowy_editor/src/editor/editor_component/service/scroll/editor_scroll_controller.dart:73:7)
#12     _AppFlowyEditorState.initState (package:appflowy_editor/src/editor/editor_component/service/editor.dart:176:9)
-------------------------------------------------------------------------------
ValueNotifier<double> => package:flutter/foundation.dart/ChangeNotifier
#11     new EditorScrollController (package:appflowy_editor/src/editor/editor_component/service/scroll/editor_scroll_controller.dart:58:48)
#12     _AppFlowyEditorState.initState (package:appflowy_editor/src/editor/editor_component/service/editor.dart:176:9)
-------------------------------------------------------------------------------
ValueNotifier<int> => package:flutter/foundation.dart/ChangeNotifier
#11     new EditorState (package:appflowy_editor/src/editor_state.dart:241:40)
#12     new EditorState.blank (package:appflowy_editor/src/editor_state.dart:77:8)
-------------------------------------------------------------------------------

Exited.

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (be92cfa) 78.63% compared to head (d6dbe2e) 78.67%.

Files Patch % Lines
...ditor_component/service/scroll_service_widget.dart 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #615      +/-   ##
==========================================
+ Coverage   78.63%   78.67%   +0.04%     
==========================================
  Files         291      290       -1     
  Lines       12627    12621       -6     
==========================================
+ Hits         9929     9930       +1     
+ Misses       2698     2691       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LucasXu0 LucasXu0 merged commit ffab5a1 into AppFlowy-IO:main Dec 8, 2023
11 checks passed
q200892907 added a commit to q200892907/appflowy-editor that referenced this pull request Dec 11, 2023
* main:
  chore: bump version 2.1.0 (AppFlowy-IO#616)
  fix: memory leaks (AppFlowy-IO#615)
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

Successfully merging this pull request may close these issues.

1 participant