Browse Source

Added notes in Timeline about memory leak and added rdar to README.

Christian Noon 9 years ago
parent
commit
6c1cbdd7f5
2 changed files with 5 additions and 0 deletions
  1. 1 0
      README.md
  2. 4 0
      Source/Timeline.swift

+ 1 - 0
README.md

@@ -1250,6 +1250,7 @@ There are some important things to remember when using network reachability to d
 The following rdars have some affect on the current implementation of Alamofire.
 
 * [rdar://21349340](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case
+* [rdar://26761490](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage
 
 ## FAQ
 

+ 4 - 0
Source/Timeline.swift

@@ -91,6 +91,8 @@ extension Timeline: CustomStringConvertible {
         let serializationDuration = String(format: "%.3f", self.serializationDuration)
         let totalDuration = String(format: "%.3f", self.totalDuration)
 
+        // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is
+        // fixed, we should move back to string interpolation by reverting commit 7d4a43b1.
         let timings = [
             "\"Latency\": " + latency + " secs",
             "\"Request Duration\": " + requestDuration + " secs",
@@ -118,6 +120,8 @@ extension Timeline: CustomDebugStringConvertible {
         let serializationDuration = String(format: "%.3f", self.serializationDuration)
         let totalDuration = String(format: "%.3f", self.totalDuration)
 
+        // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is
+        // fixed, we should move back to string interpolation by reverting commit 7d4a43b1.
         let timings = [
             "\"Request Start Time\": " + requestStartTime,
             "\"Initial Response Time\": " + initialResponseTime,