-
Notifications
You must be signed in to change notification settings - Fork 2
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 [#63] #64
Conversation
**BUGFIX** - Scenario has strong reference to self on clousure - So, use `[weak self]`
let transitFunc = { (from: Current, stage: Stage, context: Any?) -> Void in | ||
let requestName = String(reflecting: request) | ||
|
||
let transitFunc = { [weak self](from: Current, stage: Stage, context: Any?) -> Void in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to make self weak...
@@ -69,7 +69,6 @@ public class SceneOperation<Stage> { | |||
|
|||
internal func resolve(from: Screen) -> Transition? { | |||
let name = String(reflecting: type(of: from)) | |||
print(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed debug code
Codecov Report
@@ Coverage Diff @@
## versions/0.3.0 #64 +/- ##
==================================================
+ Coverage 84.76% 91.45% +6.69%
==================================================
Files 7 7
Lines 105 117 +12
==================================================
+ Hits 89 107 +18
+ Misses 16 10 -6
Continue to review full report at Codecov.
|
BUGFIX
[weak self]