{"action":"created","issue":{"url":"https://api.github.com/repos/root-project/root/issues/2361","repository_url":"https://api.github.com/repos/root-project/root","labels_url":"https://api.github.com/repos/root-project/root/issues/2361/labels{/name}","comments_url":"https://api.github.com/repos/root-project/root/issues/2361/comments","events_url":"https://api.github.com/repos/root-project/root/issues/2361/events","html_url":"https://github.com/root-project/root/pull/2361","id":344432122,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODI4MTUy","number":2361,"title":"Fix memory leak in GetStreamInfoListImpl","user":{"login":"stwunsch","id":6951222,"node_id":"MDQ6VXNlcjY5NTEyMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/6951222?v=4","gravatar_id":"","url":"https://api.github.com/users/stwunsch","html_url":"https://github.com/stwunsch","followers_url":"https://api.github.com/users/stwunsch/followers","following_url":"https://api.github.com/users/stwunsch/following{/other_user}","gists_url":"https://api.github.com/users/stwunsch/gists{/gist_id}","starred_url":"https://api.github.com/users/stwunsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stwunsch/subscriptions","organizations_url":"https://api.github.com/users/stwunsch/orgs","repos_url":"https://api.github.com/users/stwunsch/repos","events_url":"https://api.github.com/users/stwunsch/events{/privacy}","received_events_url":"https://api.github.com/users/stwunsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-25T12:57:04Z","updated_at":"2018-07-25T13:00:27Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/root-project/root/pulls/2361","html_url":"https://github.com/root-project/root/pull/2361","diff_url":"https://github.com/root-project/root/pull/2361.diff","patch_url":"https://github.com/root-project/root/pull/2361.patch"},"body":"The program used for finding the leaks is as follows:\r\n\r\n```cpp\r\n#include \"ROOT/RDataFrame.hxx\"\r\n#include \"TSystem.h\"\r\n\r\nbool memory() {\r\n  ProcInfo_t info;\r\n  gSystem->GetProcInfo(&info);\r\n  printf(\" res  memory = %g Mbytes\\n\", info.fMemResident / 1024.);\r\n  return true;\r\n}\r\n\r\nconstexpr auto file = \"small.root\";\r\n\r\nvoid test() {\r\n  ROOT::EnableImplicitMT(1);\r\n  auto df = ROOT::RDataFrame(\"Events\", file);\r\n  df.Filter(\"Muon_pt.size()>0\")\r\n      .Define(\"pt\", \"Muon_pt[0]\")\r\n      .Filter(memory)\r\n      .Snapshot(\"Events\", \"output.root\", {\"pt\"});\r\n}\r\n\r\nint main() { test(); }\r\n```\r\n\r\nThe valgrind output before the fix:\r\n\r\n```\r\n==20802== LEAK SUMMARY:\r\n==20802==    definitely lost: 54,488 bytes in 222 blocks\r\n==20802==    indirectly lost: 23,816 bytes in 199 blocks\r\n==20802==      possibly lost: 71,130 bytes in 610 blocks\r\n==20802==    still reachable: 74,920,340 bytes in 100,971 blocks\r\n==20802==                       of which reachable via heuristic:\r\n==20802==                         newarray           : 25,424 bytes in 49 blocks\r\n==20802==                         multipleinheritance: 1,048 bytes in 3 blocks\r\n==20802==         suppressed: 6,366,063 bytes in 65,508 blocks\r\n```\r\n\r\nAnd the valgrind output after the fix:\r\n\r\n```\r\n==22182== LEAK SUMMARY:\r\n==22182==    definitely lost: 6,424 bytes in 202 blocks\r\n==22182==    indirectly lost: 23,936 bytes in 200 blocks\r\n==22182==      possibly lost: 61,230 bytes in 610 blocks\r\n==22182==    still reachable: 74,911,268 bytes in 100,857 blocks\r\n==22182==                       of which reachable via heuristic:\r\n==22182==                         newarray           : 25,424 bytes in 49 blocks\r\n==22182==                         multipleinheritance: 928 bytes in 2 blocks\r\n==22182==         suppressed: 6,374,775 bytes in 65,619 blocks\r\n```"},"comment":{"url":"https://api.github.com/repos/root-project/root/issues/comments/407745965","html_url":"https://github.com/root-project/root/pull/2361#issuecomment-407745965","issue_url":"https://api.github.com/repos/root-project/root/issues/2361","id":407745965,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzc0NTk2NQ==","user":{"login":"stwunsch","id":6951222,"node_id":"MDQ6VXNlcjY5NTEyMjI=","avatar_url":"https://avatars1.githubusercontent.com/u/6951222?v=4","gravatar_id":"","url":"https://api.github.com/users/stwunsch","html_url":"https://github.com/stwunsch","followers_url":"https://api.github.com/users/stwunsch/followers","following_url":"https://api.github.com/users/stwunsch/following{/other_user}","gists_url":"https://api.github.com/users/stwunsch/gists{/gist_id}","starred_url":"https://api.github.com/users/stwunsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stwunsch/subscriptions","organizations_url":"https://api.github.com/users/stwunsch/orgs","repos_url":"https://api.github.com/users/stwunsch/repos","events_url":"https://api.github.com/users/stwunsch/events{/privacy}","received_events_url":"https://api.github.com/users/stwunsch/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T13:00:27Z","updated_at":"2018-07-25T13:00:27Z","author_association":"CONTRIBUTOR","body":"@phsft-bot build"}}
{"actor":{"display_login":"stwunsch"}}