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 [#63] #64

Merged
merged 1 commit into from
Jun 20, 2017
Merged

🐛 Fix Memory Leak [#63] #64

merged 1 commit into from
Jun 20, 2017

Conversation

crexista
Copy link
Owner

BUGFIX

  • Scenario has strong reference to self on clousure
  • So, use [weak self]

**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
Copy link
Owner Author

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)
Copy link
Owner Author

@crexista crexista Jun 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed debug code

@codecov-io
Copy link

Codecov Report

Merging #64 into versions/0.3.0 will increase coverage by 6.69%.
The diff coverage is 100%.

Impacted file tree graph

@@                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
Impacted Files Coverage Δ
KabuKit/Classes/core/Swift/SceneOperation.swift 94.11% <ø> (-0.33%) ⬇️
KabuKit/Classes/core/Swift/ScreenHashWrapper.swift 100% <ø> (ø) ⬆️
KabuKit/Classes/core/Swift/SceneSequence.swift 100% <100%> (+21.42%) ⬆️
KabuKit/Classes/core/Swift/Scenario.swift 93.75% <100%> (+1.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03f1a2e...91a0c3e. Read the comment docs.

crexista added a commit that referenced this pull request Jun 19, 2017
** UPDATE **
 - Scenario's protocol is named `Transition`, but scenario does not transition, but handle transtion.
 - So, scenario close to procedure rather than transition
 - `Transition` keyword will be used other class
@crexista crexista added this to the ver0.3.0 milestone Jun 19, 2017
@crexista crexista merged commit 0dcecf7 into versions/0.3.0 Jun 20, 2017
@crexista crexista deleted the fix/memory_leak branch June 20, 2017 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Version 0.3.0
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

2 participants