{"action":"created","issue":{"url":"https://api.github.com/repos/alanxz/SimpleAmqpClient/issues/159","repository_url":"https://api.github.com/repos/alanxz/SimpleAmqpClient","labels_url":"https://api.github.com/repos/alanxz/SimpleAmqpClient/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/alanxz/SimpleAmqpClient/issues/159/comments","events_url":"https://api.github.com/repos/alanxz/SimpleAmqpClient/issues/159/events","html_url":"https://github.com/alanxz/SimpleAmqpClient/issues/159","id":240879134,"number":159,"title":"Is there memory leak?","user":{"login":"applecandyfromsky","id":29495241,"avatar_url":"https://avatars3.githubusercontent.com/u/29495241?v=3","gravatar_id":"","url":"https://api.github.com/users/applecandyfromsky","html_url":"https://github.com/applecandyfromsky","followers_url":"https://api.github.com/users/applecandyfromsky/followers","following_url":"https://api.github.com/users/applecandyfromsky/following{/other_user}","gists_url":"https://api.github.com/users/applecandyfromsky/gists{/gist_id}","starred_url":"https://api.github.com/users/applecandyfromsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/applecandyfromsky/subscriptions","organizations_url":"https://api.github.com/users/applecandyfromsky/orgs","repos_url":"https://api.github.com/users/applecandyfromsky/repos","events_url":"https://api.github.com/users/applecandyfromsky/events{/privacy}","received_events_url":"https://api.github.com/users/applecandyfromsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-06T08:20:17Z","updated_at":"2017-07-06T08:21:33Z","closed_at":null,"body":"code:\r\n\r\nint main(){\r\n\t vector<AmqpClient::Channel::ptr_t> a;\r\n\t for(int i=0;i<300;i++){\r\n\t\tAmqpClient::Channel::ptr_t b = AmqpClient::Channel::Create( \"127.0.0.1\", 5672, \"hahaha\", \"hahaha\");\r\n\t\tb->DeclareExchange(\"ex_2gate\");\r\n\t\t\t\tb->DeclareExchange(\"ex_2app\");\r\n\t\ta.push_back(b);\r\n\t}\r\n\tstd::this_thread::sleep_for(std::chrono::seconds(10));\r\n\tfor(int i=0;i<300;i++)\r\n\t\ta[i].reset();\r\n\ta.resize(0);\r\n\tstd::this_thread::sleep_for(std::chrono::seconds(60));\r\n}\r\n\r\nI use top and find that after all the connections have been closed,the program still uses much memory."},"comment":{"url":"https://api.github.com/repos/alanxz/SimpleAmqpClient/issues/comments/313329481","html_url":"https://github.com/alanxz/SimpleAmqpClient/issues/159#issuecomment-313329481","issue_url":"https://api.github.com/repos/alanxz/SimpleAmqpClient/issues/159","id":313329481,"user":{"login":"applecandyfromsky","id":29495241,"avatar_url":"https://avatars3.githubusercontent.com/u/29495241?v=3","gravatar_id":"","url":"https://api.github.com/users/applecandyfromsky","html_url":"https://github.com/applecandyfromsky","followers_url":"https://api.github.com/users/applecandyfromsky/followers","following_url":"https://api.github.com/users/applecandyfromsky/following{/other_user}","gists_url":"https://api.github.com/users/applecandyfromsky/gists{/gist_id}","starred_url":"https://api.github.com/users/applecandyfromsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/applecandyfromsky/subscriptions","organizations_url":"https://api.github.com/users/applecandyfromsky/orgs","repos_url":"https://api.github.com/users/applecandyfromsky/repos","events_url":"https://api.github.com/users/applecandyfromsky/events{/privacy}","received_events_url":"https://api.github.com/users/applecandyfromsky/received_events","type":"User","site_admin":false},"created_at":"2017-07-06T08:21:33Z","updated_at":"2017-07-06T08:21:33Z","body":"%MEM from 2.0 to 1.6.\r\nI expect it should be close to 0."}}
{"actor":{"display_login":"applecandyfromsky"}}