{"action":"created","issue":{"url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/323","labels_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/323/comments","events_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/323/events","html_url":"https://github.com/SwiftyJSON/SwiftyJSON/issues/323","id":105826528,"number":323,"title":"Memory leak in XCode 7.1 beta","user":{"login":"namanhams","id":327032,"avatar_url":"https://avatars.githubusercontent.com/u/327032?v=3","gravatar_id":"","url":"https://api.github.com/users/namanhams","html_url":"https://github.com/namanhams","followers_url":"https://api.github.com/users/namanhams/followers","following_url":"https://api.github.com/users/namanhams/following{/other_user}","gists_url":"https://api.github.com/users/namanhams/gists{/gist_id}","starred_url":"https://api.github.com/users/namanhams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namanhams/subscriptions","organizations_url":"https://api.github.com/users/namanhams/orgs","repos_url":"https://api.github.com/users/namanhams/repos","events_url":"https://api.github.com/users/namanhams/events{/privacy}","received_events_url":"https://api.github.com/users/namanhams/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-10T14:51:15Z","updated_at":"2015-09-27T03:46:16Z","closed_at":null,"body":"I use Alamofire to make an API call and use SwiftyJSON to wrap around the json response. XCode Instrument shows that there's memory leak created by Alamofire library.\r\nHere's the code (pretty simple) : \r\n\r\n    Alamofire.request(service.method, service.url, parameters: nil, encoding: ParameterEncoding.URL,\r\n    headers: headers).responseJSON(completionHandler: { (req, res, result) -> Void in\r\n\r\n           // This line leak the memory\r\n           let json = JSON(result.value!)\r\n        })\r\n\r\nIf i comment out the line `let json = JSON(result.value!)` then no more memory leak. "},"comment":{"url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/comments/143515587","html_url":"https://github.com/SwiftyJSON/SwiftyJSON/issues/323#issuecomment-143515587","issue_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/323","id":143515587,"user":{"login":"namanhams","id":327032,"avatar_url":"https://avatars.githubusercontent.com/u/327032?v=3","gravatar_id":"","url":"https://api.github.com/users/namanhams","html_url":"https://github.com/namanhams","followers_url":"https://api.github.com/users/namanhams/followers","following_url":"https://api.github.com/users/namanhams/following{/other_user}","gists_url":"https://api.github.com/users/namanhams/gists{/gist_id}","starred_url":"https://api.github.com/users/namanhams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namanhams/subscriptions","organizations_url":"https://api.github.com/users/namanhams/orgs","repos_url":"https://api.github.com/users/namanhams/repos","events_url":"https://api.github.com/users/namanhams/events{/privacy}","received_events_url":"https://api.github.com/users/namanhams/received_events","type":"User","site_admin":false},"created_at":"2015-09-27T03:46:16Z","updated_at":"2015-09-27T03:46:16Z","body":"I just found out exactly the same as Tehong. It seems that this is bug with Swift, but has been fixed in XCode 7.1 beta 2. "}}