{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/52465969","id":52465969,"diff_hunk":"@@ -365,10 +365,17 @@ cdef int free_tree(Tree* tree) nogil:\n     for i in range(3):\n         cnt[i] = 0\n     free_recursive(tree, tree.root_node, cnt)\n+    if not tree.root_node.is_leaf:\n+        free(tree.root_node.children)\n+    free(tree.root_node.width)\n+    free(tree.root_node.left_edge)\n+    free(tree.root_node.center)\n+    free(tree.root_node.barycenter)\n+    free(tree.root_node.leaf_point_position)\n     free(tree.root_node)","path":"sklearn/manifold/_barnes_hut_tsne.pyx","position":11,"original_position":11,"commit_id":"05c83665ddaf23cfcecf15b1f593f47561cd603c","original_commit_id":"05c83665ddaf23cfcecf15b1f593f47561cd603c","user":{"login":"ogrisel","id":89061,"avatar_url":"https://avatars.githubusercontent.com/u/89061?v=3","gravatar_id":"","url":"https://api.github.com/users/ogrisel","html_url":"https://github.com/ogrisel","followers_url":"https://api.github.com/users/ogrisel/followers","following_url":"https://api.github.com/users/ogrisel/following{/other_user}","gists_url":"https://api.github.com/users/ogrisel/gists{/gist_id}","starred_url":"https://api.github.com/users/ogrisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogrisel/subscriptions","organizations_url":"https://api.github.com/users/ogrisel/orgs","repos_url":"https://api.github.com/users/ogrisel/repos","events_url":"https://api.github.com/users/ogrisel/events{/privacy}","received_events_url":"https://api.github.com/users/ogrisel/received_events","type":"User","site_admin":false},"body":"@AlexanderFabisch have you seen my previous comment? Would you like to address it or let someone else to take over from there?","created_at":"2016-02-10T14:47:41Z","updated_at":"2016-02-10T14:47:41Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/5983#discussion_r52465969","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/52465969"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/5983#discussion_r52465969"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983","id":52948437,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/5983","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/5983.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/5983.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5983","number":5983,"state":"open","locked":false,"title":"[MRG+1] Fix memory leak in Barnes-Hut SNE","user":{"login":"AlexanderFabisch","id":869592,"avatar_url":"https://avatars.githubusercontent.com/u/869592?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderFabisch","html_url":"https://github.com/AlexanderFabisch","followers_url":"https://api.github.com/users/AlexanderFabisch/followers","following_url":"https://api.github.com/users/AlexanderFabisch/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderFabisch/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderFabisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderFabisch/subscriptions","organizations_url":"https://api.github.com/users/AlexanderFabisch/orgs","repos_url":"https://api.github.com/users/AlexanderFabisch/repos","events_url":"https://api.github.com/users/AlexanderFabisch/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderFabisch/received_events","type":"User","site_admin":false},"body":"That seems to fix #5916 for me. @vighneshbirodkar still seems to have problems.\r\n\r\nHere is a test program:\r\n\r\n```python\r\nimport numpy as np\r\nfrom sklearn.manifold import TSNE\r\nX = np.random.rand(10, 10)\r\nt = TSNE()\r\nt.fit(X)\r\n```\r\n\r\nYou can run it with `valgrind --leak-check=full --track-origins=yes python test_tsne.py 2> logfile` and search for \"barnes\" in the logfile.","created_at":"2015-12-08T07:51:40Z","updated_at":"2016-02-10T14:47:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f912215c5d8def13f4938b8e3e2312c08ed4afd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983/comments","review_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5983/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/05c83665ddaf23cfcecf15b1f593f47561cd603c","head":{"label":"AlexanderFabisch:fix_bhsne","ref":"fix_bhsne","sha":"05c83665ddaf23cfcecf15b1f593f47561cd603c","user":{"login":"AlexanderFabisch","id":869592,"avatar_url":"https://avatars.githubusercontent.com/u/869592?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderFabisch","html_url":"https://github.com/AlexanderFabisch","followers_url":"https://api.github.com/users/AlexanderFabisch/followers","following_url":"https://api.github.com/users/AlexanderFabisch/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderFabisch/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderFabisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderFabisch/subscriptions","organizations_url":"https://api.github.com/users/AlexanderFabisch/orgs","repos_url":"https://api.github.com/users/AlexanderFabisch/repos","events_url":"https://api.github.com/users/AlexanderFabisch/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderFabisch/received_events","type":"User","site_admin":false},"repo":{"id":15760223,"name":"scikit-learn","full_name":"AlexanderFabisch/scikit-learn","owner":{"login":"AlexanderFabisch","id":869592,"avatar_url":"https://avatars.githubusercontent.com/u/869592?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderFabisch","html_url":"https://github.com/AlexanderFabisch","followers_url":"https://api.github.com/users/AlexanderFabisch/followers","following_url":"https://api.github.com/users/AlexanderFabisch/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderFabisch/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderFabisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderFabisch/subscriptions","organizations_url":"https://api.github.com/users/AlexanderFabisch/orgs","repos_url":"https://api.github.com/users/AlexanderFabisch/repos","events_url":"https://api.github.com/users/AlexanderFabisch/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderFabisch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexanderFabisch/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn","forks_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/forks","keys_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/teams","hooks_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/events","assignees_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/tags","blobs_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/subscription","commits_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/merges","archive_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/downloads","issues_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/AlexanderFabisch/scikit-learn/deployments","created_at":"2014-01-09T07:57:06Z","updated_at":"2016-01-19T17:05:39Z","pushed_at":"2015-11-29T18:21:44Z","git_url":"git://github.com/AlexanderFabisch/scikit-learn.git","ssh_url":"git@github.com:AlexanderFabisch/scikit-learn.git","clone_url":"https://github.com/AlexanderFabisch/scikit-learn.git","svn_url":"https://github.com/AlexanderFabisch/scikit-learn","homepage":"http://scikit-learn.org","size":69626,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"4cac98688b13998f00c2f88c53cfa6ec84a19ab7","user":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"repo":{"id":843222,"name":"scikit-learn","full_name":"scikit-learn/scikit-learn","owner":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-learn/scikit-learn","description":"scikit-learn: machine learning in Python","fork":false,"url":"https://api.github.com/repos/scikit-learn/scikit-learn","forks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/forks","keys_url":"https://api.github.com/repos/scikit-learn/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-learn/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-learn/scikit-learn/teams","hooks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/events","assignees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-learn/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/tags","blobs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-learn/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscription","commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-learn/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-learn/scikit-learn/merges","archive_url":"https://api.github.com/repos/scikit-learn/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-learn/scikit-learn/downloads","issues_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-learn/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/scikit-learn/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/deployments","created_at":"2010-08-17T09:43:38Z","updated_at":"2016-02-10T13:31:20Z","pushed_at":"2016-02-10T14:45:33Z","git_url":"git://github.com/scikit-learn/scikit-learn.git","ssh_url":"git@github.com:scikit-learn/scikit-learn.git","clone_url":"https://github.com/scikit-learn/scikit-learn.git","svn_url":"https://github.com/scikit-learn/scikit-learn","homepage":"http://scikit-learn.org","size":99947,"stargazers_count":9697,"watchers_count":9697,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5692,"mirror_url":null,"open_issues_count":1048,"forks":5692,"open_issues":1048,"watchers":9697,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/5983"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5983"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5983/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5983/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/05c83665ddaf23cfcecf15b1f593f47561cd603c"}}}}