[SR-8526] Memory leak after switch in release configuration #51046
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
memory leak
bug: Memory leak
optimized only
Flag: An issue whose reproduction requires optimized compilation
Environment
Xcode 9.4.1 (9F2000), Xcode 10.0 beta 5 (10L221o)
Swift 4.1/Swift 4.2, Release configuration
iPhone X iOS 11.4 / iPhone X Simulator 12.0
Additional Detail from JIRA
md5: 78345c898f38d78fa1941b37f88392e2
Issue Description:
What I do:
build code below in Release configuration:
What I expect:
Subject is deallocated eventually
What I receive:
Subject is not deallocated. It seems that the problem is in switch + array + if statement: changing any part of this fixes the problem.
Possible workarounds:
1) Extracting switch to extension of Content
2) Making additional init in Holder, that receives only one Subject
3) Extracting if statement to function with content as argument
The text was updated successfully, but these errors were encountered: