{"action":"closed","number":8659,"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/8659","id":22628029,"html_url":"https://github.com/cocos2d/cocos2d-x/pull/8659","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/8659.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/8659.patch","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8659","number":8659,"state":"closed","locked":false,"title":"Fix one memory leak of removeFromParentAndCleanup in cocos2dx 2.x","user":{"login":"neil-wu","id":5682948,"avatar_url":"https://avatars.githubusercontent.com/u/5682948?v=3","gravatar_id":"","url":"https://api.github.com/users/neil-wu","html_url":"https://github.com/neil-wu","followers_url":"https://api.github.com/users/neil-wu/followers","following_url":"https://api.github.com/users/neil-wu/following{/other_user}","gists_url":"https://api.github.com/users/neil-wu/gists{/gist_id}","starred_url":"https://api.github.com/users/neil-wu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neil-wu/subscriptions","organizations_url":"https://api.github.com/users/neil-wu/orgs","repos_url":"https://api.github.com/users/neil-wu/repos","events_url":"https://api.github.com/users/neil-wu/events{/privacy}","received_events_url":"https://api.github.com/users/neil-wu/received_events","type":"User","site_admin":false},"body":"//neilwu (wuyupeng2007(AT)gmail.com) modify\r\nBecause Widget only supports Widgets as children, so if child is not a widget, \r\nwhen you call child->removeFromParentAndCleanup(), this will lead to memory leak!!! \r\n\r\nThe following code show detail info about this bug:\r\n    //....(TODO:load armature res)\r\n    UIImageView* pbg = UIImageView::create();\r\n    pbg->loadTexture(\"CloseNormal.png\");\r\n    pbg->setPosition(ccp(200, 100));\r\n    addChild(pbg);\r\n    CCArmature* armature = CCArmature::create(\"demo_armature\"); //TODO:you need preload som demo res\r\n    pbg->addNode(armature, 1, 111);\r\n    \r\n    //check this:\r\n    armature->removeFromParentAndCleanup(true); //This will lead the bug.","created_at":"2014-10-13T06:41:59Z","updated_at":"2016-05-20T07:21:13Z","closed_at":"2016-05-20T07:21:13Z","merged_at":null,"merge_commit_sha":"c32b0233384fcee29403f0a3091768ba830fc09c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/8659/commits","review_comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/8659/comments","review_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8659/comments","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/6ed33ec0f7af8637bb968b354c81fc6eb10a60cf","head":{"label":"neil-wu:v2","ref":"v2","sha":"6ed33ec0f7af8637bb968b354c81fc6eb10a60cf","user":{"login":"neil-wu","id":5682948,"avatar_url":"https://avatars.githubusercontent.com/u/5682948?v=3","gravatar_id":"","url":"https://api.github.com/users/neil-wu","html_url":"https://github.com/neil-wu","followers_url":"https://api.github.com/users/neil-wu/followers","following_url":"https://api.github.com/users/neil-wu/following{/other_user}","gists_url":"https://api.github.com/users/neil-wu/gists{/gist_id}","starred_url":"https://api.github.com/users/neil-wu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neil-wu/subscriptions","organizations_url":"https://api.github.com/users/neil-wu/orgs","repos_url":"https://api.github.com/users/neil-wu/repos","events_url":"https://api.github.com/users/neil-wu/events{/privacy}","received_events_url":"https://api.github.com/users/neil-wu/received_events","type":"User","site_admin":false},"repo":{"id":22160027,"name":"cocos2d-x","full_name":"neil-wu/cocos2d-x","owner":{"login":"neil-wu","id":5682948,"avatar_url":"https://avatars.githubusercontent.com/u/5682948?v=3","gravatar_id":"","url":"https://api.github.com/users/neil-wu","html_url":"https://github.com/neil-wu","followers_url":"https://api.github.com/users/neil-wu/followers","following_url":"https://api.github.com/users/neil-wu/following{/other_user}","gists_url":"https://api.github.com/users/neil-wu/gists{/gist_id}","starred_url":"https://api.github.com/users/neil-wu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neil-wu/subscriptions","organizations_url":"https://api.github.com/users/neil-wu/orgs","repos_url":"https://api.github.com/users/neil-wu/repos","events_url":"https://api.github.com/users/neil-wu/events{/privacy}","received_events_url":"https://api.github.com/users/neil-wu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neil-wu/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/neil-wu/cocos2d-x","forks_url":"https://api.github.com/repos/neil-wu/cocos2d-x/forks","keys_url":"https://api.github.com/repos/neil-wu/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neil-wu/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neil-wu/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/neil-wu/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/neil-wu/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/neil-wu/cocos2d-x/events","assignees_url":"https://api.github.com/repos/neil-wu/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/neil-wu/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/neil-wu/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/neil-wu/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neil-wu/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neil-wu/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/neil-wu/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neil-wu/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/neil-wu/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/neil-wu/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/neil-wu/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/neil-wu/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/neil-wu/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/neil-wu/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/neil-wu/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/neil-wu/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/neil-wu/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/neil-wu/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/neil-wu/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neil-wu/cocos2d-x/merges","archive_url":"https://api.github.com/repos/neil-wu/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neil-wu/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/neil-wu/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/neil-wu/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/neil-wu/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/neil-wu/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neil-wu/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/neil-wu/cocos2d-x/releases{/id}","deployments_url":"https://api.github.com/repos/neil-wu/cocos2d-x/deployments","created_at":"2014-07-23T16:15:00Z","updated_at":"2014-07-23T14:58:04Z","pushed_at":"2014-10-13T06:38:53Z","git_url":"git://github.com/neil-wu/cocos2d-x.git","ssh_url":"git@github.com:neil-wu/cocos2d-x.git","clone_url":"https://github.com/neil-wu/cocos2d-x.git","svn_url":"https://github.com/neil-wu/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":112225,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v3"}},"base":{"label":"cocos2d:v2","ref":"v2","sha":"b66d16172bdc515909ca8e9366d9475f3db7f2d2","user":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"repo":{"id":1093228,"name":"cocos2d-x","full_name":"cocos2d/cocos2d-x","owner":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos2d/cocos2d-x","description":"cocos2d-x for C++","fork":false,"url":"https://api.github.com/repos/cocos2d/cocos2d-x","forks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/forks","keys_url":"https://api.github.com/repos/cocos2d/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos2d/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos2d/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/events","assignees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/cocos2d/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos2d/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/cocos2d/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos2d/cocos2d-x/merges","archive_url":"https://api.github.com/repos/cocos2d/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos2d/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos2d/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/cocos2d/cocos2d-x/releases{/id}","deployments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/deployments","created_at":"2010-11-18T23:17:00Z","updated_at":"2016-05-20T04:47:22Z","pushed_at":"2016-05-20T06:59:07Z","git_url":"git://github.com/cocos2d/cocos2d-x.git","ssh_url":"git@github.com:cocos2d/cocos2d-x.git","clone_url":"https://github.com/cocos2d/cocos2d-x.git","svn_url":"https://github.com/cocos2d/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":1511209,"stargazers_count":8053,"watchers_count":8053,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5399,"mirror_url":null,"open_issues_count":1048,"forks":5399,"open_issues":1048,"watchers":8053,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/8659"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/8659"},"issue":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8659"},"comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/8659/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/8659/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/8659/commits"},"statuses":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/6ed33ec0f7af8637bb968b354c81fc6eb10a60cf"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":3,"review_comments":0,"commits":1,"additions":13,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"minggo"}}