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 leak of graph view dispose(introduce by #4023) #4114

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

cyrilluce
Copy link
Contributor

Description

修复内存泄漏问题

最初的pr #4009
因为没有考虑到 Graph View 的 container 需要保留, 在 #4023 中注释掉了 view 的清理逻辑, 导致会重新引发内存泄漏
现给view添加了清理时保留 container 的选项, 以实现兼容 Graph View 的历史逻辑

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Enhancement (changes that improvement of current feature or performance)
  • Refactoring (changes that neither fixes a bug nor adds a feature)
  • Test Case (changes that add missing tests or correct existing tests)
  • Code style optimization (changes that do not affect the meaning of the code)
  • Docs (changes that only update documentation)
  • Chore (changes that don't modify src or test files)

Self Check before Merge

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@x6-bot x6-bot bot added fix size/S Denotes a PR that changes 10-29 lines, ignoring generated files. PR: unreviewed PR does not have any reviews. pkg:x6 labels Dec 22, 2023
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

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

Comparison is base (12ca0e1) 10.37% compared to head (3e35ee6) 10.37%.
Report is 5 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4114   +/-   ##
=======================================
  Coverage   10.37%   10.37%           
=======================================
  Files         180      180           
  Lines       10542    10542           
  Branches     2566     2566           
=======================================
  Hits         1094     1094           
  Misses       9359     9359           
  Partials       89       89           
Flag Coverage Δ
x6 10.37% <10.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
packages/x6/src/graph/view.ts 5.00% <0.00%> (ø)
packages/x6/src/view/view.ts 6.04% <12.50%> (ø)

@x6-bot x6-bot bot added PR: reviewed-approved PR has reviewed and got Approve from everyone. and removed PR: unreviewed PR does not have any reviews. labels Jan 9, 2024
@NewByVector NewByVector merged commit 8d0a850 into antvis:master Jan 9, 2024
22 checks passed
@x6-bot x6-bot bot added PR: merged PR has merged. and removed PR: reviewed-approved PR has reviewed and got Approve from everyone. labels Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pkg:x6 PR: merged PR has merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants