Swift: Memory leak when storing enum in class
Originator: | alex | ||
Number: | rdar://30549163 | Date Originated: | 16-Feb-2017 |
Status: | Duplicate of 30856358 (Closed) | Resolved: | |
Product: | Xcode | Product Version: | 8.2.1 (8C1002) |
Classification: | Performance | Reproducible: | Always |
Area: Xcode Summary: Memory leak occurs when storing an enum in a class. Very small sample project attached - see AppDelegate.swift. Steps to Reproduce: 1. Open attached sample app 2. Select a physical device to run on (not a simulator) 3. Run Instruments (Cmd-I) 4. Select the Leaks template 5. Start recording Expected Results: No leaks. Actual Results: Multiple leaks of _ContiguousArrayStorage<Item>. Version: iOS 10.2.1, Xcode 8.2.1 (8C1002) Notes: Configuration: Reproduced on iPhone 7 and iPhone 5 Attachments: 'LeakCheck.zip' and 'leaks.png' were successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Fixed in Xcode 8.3.
Gist with reproducible sample