Swift string interpolation causing memory leak with common usage

Originator:christian.noon
Number:rdar://26761490 Date Originated:12-Jun-2016 02:48 PM
Status:Closed Resolved:1-Sept-2017 09:44 AM
Product:Developer Tools Product Version:Xcode 7.3.1
Classification:Serious Bug Reproducible:Always
 
We are seeing a memory leak in Swift string interpolation in Alamofire. We've built a sample project that produces the leak. We've also switched over to using string concatenation temporarily as a workaround.

* https://github.com/Alamofire/Rdar-StringInterpolationMemoryLeak

Steps to Reproduce:
1) Open the attached sample project
2) Run it within Leaks
3) Watch it leak when printing out the `Timeline` object

Expected Results:
No leaks would appear in the Leaks Instrument.

Actual Results:
Leaks are appearing in the Leaks Instrument.

Version:
Version 7.3 (7D175) and Xcode 7.3.1 (7D1014) on OS X 10.11.4

Notes:


Configuration:


Attachments:
'String Interpolation Memory Leak.zip' was successfully uploaded.

Comments

I was able to verify that with Xcode 9 beta 6, the leaks have been resolved. Thank you for the fix!

By christian.noon at Sept. 1, 2017, 4:43 p.m. (reply...)

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!