{"action":"created","issue":{"url":"https://api.github.com/repos/gabriel/MPMessagePack/issues/8","labels_url":"https://api.github.com/repos/gabriel/MPMessagePack/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/gabriel/MPMessagePack/issues/8/comments","events_url":"https://api.github.com/repos/gabriel/MPMessagePack/issues/8/events","html_url":"https://github.com/gabriel/MPMessagePack/issues/8","id":80738143,"number":8,"title":"Memory leak in readObject","user":{"login":"damiantrimboli","id":7233102,"avatar_url":"https://avatars.githubusercontent.com/u/7233102?v=3","gravatar_id":"","url":"https://api.github.com/users/damiantrimboli","html_url":"https://github.com/damiantrimboli","followers_url":"https://api.github.com/users/damiantrimboli/followers","following_url":"https://api.github.com/users/damiantrimboli/following{/other_user}","gists_url":"https://api.github.com/users/damiantrimboli/gists{/gist_id}","starred_url":"https://api.github.com/users/damiantrimboli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiantrimboli/subscriptions","organizations_url":"https://api.github.com/users/damiantrimboli/orgs","repos_url":"https://api.github.com/users/damiantrimboli/repos","events_url":"https://api.github.com/users/damiantrimboli/events{/privacy}","received_events_url":"https://api.github.com/users/damiantrimboli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-26T01:41:50Z","updated_at":"2015-06-01T18:48:47Z","closed_at":"2015-06-01T18:48:47Z","body":"Hi Gabriel, \r\nI'm using your library. Very nice indeed :)\r\n\r\nBut i'm having a problem, I think the readObject method is leaking some NSMutableData inside.\r\nFor example, if I call this a lot of times in a loop without even storing the NSDictionary, the memory keeps increasing.\r\n\r\n var reader:MPMessagePackReader = MPMessagePackReader(data: dataChannel);\r\n reader.readObject(nil) as! NSDictionary;\r\n\r\nAnd there is no way of freeing it. \r\nInstruments found these as \"Zombies\" if you profile it.\r\n\r\nCould you check this please?\r\nThank you so much.\r\n\r\nDamian."},"comment":{"url":"https://api.github.com/repos/gabriel/MPMessagePack/issues/comments/107669267","html_url":"https://github.com/gabriel/MPMessagePack/issues/8#issuecomment-107669267","issue_url":"https://api.github.com/repos/gabriel/MPMessagePack/issues/8","id":107669267,"user":{"login":"gabriel","id":2669,"avatar_url":"https://avatars.githubusercontent.com/u/2669?v=3","gravatar_id":"","url":"https://api.github.com/users/gabriel","html_url":"https://github.com/gabriel","followers_url":"https://api.github.com/users/gabriel/followers","following_url":"https://api.github.com/users/gabriel/following{/other_user}","gists_url":"https://api.github.com/users/gabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriel/subscriptions","organizations_url":"https://api.github.com/users/gabriel/orgs","repos_url":"https://api.github.com/users/gabriel/repos","events_url":"https://api.github.com/users/gabriel/events{/privacy}","received_events_url":"https://api.github.com/users/gabriel/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T18:48:46Z","updated_at":"2015-06-01T18:48:46Z","body":"Yeah move that into the while and it doesn't leak..\r\n\r\n```objc\r\nwhile (true) {\r\n  autoreleasepool {\r\n    self!.test();\r\n  } \r\n}\r\n```"}}