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

Workaround a closure based generator leak in Swift #281

Merged
merged 1 commit into from
Apr 6, 2016

Conversation

onevcat
Copy link
Owner

@onevcat onevcat commented Apr 6, 2016

This p-r fixes an issue in Swift Generator. This is reported here: #280

After some research, I found when using a closure based generator, a leak will happen in Release build in _GeneratorBox.__allocating_init(A) -> _GeneratorBox. It does not relate to Kingfisher's code, since there are some minimal examples are also reported to be leaking by Instruments.

Turn to a normal GeneratorType instead of closure based one could solve this problem.

@codecov-io
Copy link

Current coverage is 79.27%

Merging #281 into master will decrease coverage by -0.07% as of f93eb78

@@            master    #281   diff @@
======================================
  Files           12      12       
  Stmts         1375    1370     -5
  Branches         0       0       
  Methods          0       0       
======================================
- Hit           1091    1086     -5
  Partial          0       0       
  Missed         284     284       

Review entire Coverage Diff as of f93eb78

Powered by Codecov. Updated on successful CI builds.

@onevcat onevcat merged commit fec2064 into master Apr 6, 2016
@onevcat onevcat deleted the fix/closure-based-generator-leak branch April 6, 2016 07:04
@onevcat onevcat mentioned this pull request Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants