wwt / SwiftCurrent

A library for managing complex workflows in Swift
https://wwt.github.io/SwiftCurrent/
Apache License 2.0
308 stars 19 forks source link

Fixes the underlying LinkedList retain cycle issue #39

Closed Tyler-Keith-Thompson closed 3 years ago

Tyler-Keith-Thompson commented 3 years ago

…Had to comment out sort tests because something very strange is happening with it - TT

Linked Issue: Closes #38

Checklist:


If Applicable:


If Public API Has Changed:

Tyler-Keith-Thompson commented 3 years ago

I have functioning code that resolves the memory leak, but it has caused unexpected behavior with sort. I thought I'd create a draft pull request in case the team decided that sorting was sort of a silly operation to even allow on a Workflow anyways and wanted to just delete the sort code and move on.

I will continue to work on fixing that in my spare time.

For those curious where the memory leak was, it's just that the LinkedList needed a deinit to clean up strong references on nodes. Nothing major, I've got a test around that.

Tyler-Keith-Thompson commented 3 years ago

I withdraw my last statement, that sorting issue exposed a much more serious one with how removeTillEnd worked. Can't believe that was missed. It's now all fixed, and we're much better about memory usage AND we don't have an infinitely looping function in the codebase anymore. Yay!

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication