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

Remove strong reference cycle #118

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Remove strong reference cycle #118

merged 1 commit into from
Sep 25, 2023

Conversation

humdrum
Copy link
Contributor

@humdrum humdrum commented Sep 22, 2023

What this PR does / why we need it:

  • Remove memory leaks caused by strong reference cycles of Trees.
  • Set parents as weak to prevent a strong reference cycle.
  • Set prev and next of RGATreeSplit too.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

@humdrum humdrum added the bug 🐞 Something isn't working label Sep 22, 2023
@humdrum humdrum added this to the 0.4.7 milestone Sep 22, 2023
@humdrum humdrum self-assigned this Sep 22, 2023
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (38ea3c2) 44.24% compared to head (3318bda) 44.24%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   44.24%   44.24%           
=======================================
  Files         105      105           
  Lines       22229    22229           
=======================================
  Hits         9836     9836           
  Misses      12393    12393           
Files Changed Coverage Δ
Sources/Document/CRDT/CRDTTree.swift 66.25% <ø> (ø)
Sources/Document/CRDT/RGATreeSplit.swift 77.66% <ø> (ø)
Sources/Util/LLRBTree.swift 86.68% <ø> (ø)
Sources/Util/SplayTree.swift 87.05% <ø> (ø)
Sources/Util/Trie.swift 85.52% <ø> (ø)

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

@humdrum humdrum merged commit 6920ce3 into main Sep 25, 2023
3 checks passed
@humdrum humdrum deleted the fix_memory_leak branch September 25, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants