{"action":"created","comment":{"url":"https://api.github.com/repos/enthought/mayavi/pulls/comments/34133840","id":34133840,"diff_hunk":"@@ -228,6 +229,14 @@ def __setstate__(self, str_state):\n         state_pickler.set_state(self, state_pickler.loads_state(str_state))\n \n     ###########################################################################\n+    # 'event' interface.\n+    ###########################################################################\n+    def _closed_fired(self):\n+        del self.light_manager\n+        del self._interactor\n+        del self","path":"tvtk/pyface/tvtk_scene.py","position":17,"original_position":17,"commit_id":"d97a30f56ca329c120ceb60691d809c2f8ce2cee","original_commit_id":"d97a30f56ca329c120ceb60691d809c2f8ce2cee","user":{"login":"itziakos","id":403930,"avatar_url":"https://avatars.githubusercontent.com/u/403930?v=3","gravatar_id":"","url":"https://api.github.com/users/itziakos","html_url":"https://github.com/itziakos","followers_url":"https://api.github.com/users/itziakos/followers","following_url":"https://api.github.com/users/itziakos/following{/other_user}","gists_url":"https://api.github.com/users/itziakos/gists{/gist_id}","starred_url":"https://api.github.com/users/itziakos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itziakos/subscriptions","organizations_url":"https://api.github.com/users/itziakos/orgs","repos_url":"https://api.github.com/users/itziakos/repos","events_url":"https://api.github.com/users/itziakos/events{/privacy}","received_events_url":"https://api.github.com/users/itziakos/received_events","type":"User","site_admin":false},"body":"I think for traits it is better to do.\r\n\r\n```python\r\nself.light_manager = None\r\nself._interactor = None\r\n```\r\n\r\nAlso there should not be a need to `del self` since `self` will be garbadge collected as soon as the method is called,","created_at":"2015-07-08T10:20:40Z","updated_at":"2015-07-08T10:20:40Z","html_url":"https://github.com/enthought/mayavi/pull/212#discussion_r34133840","pull_request_url":"https://api.github.com/repos/enthought/mayavi/pulls/212","_links":{"self":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/comments/34133840"},"html":{"href":"https://github.com/enthought/mayavi/pull/212#discussion_r34133840"},"pull_request":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/212"}}},"pull_request":{"url":"https://api.github.com/repos/enthought/mayavi/pulls/212","id":39452102,"html_url":"https://github.com/enthought/mayavi/pull/212","diff_url":"https://github.com/enthought/mayavi/pull/212.diff","patch_url":"https://github.com/enthought/mayavi/pull/212.patch","issue_url":"https://api.github.com/repos/enthought/mayavi/issues/212","number":212,"state":"open","locked":false,"title":"Fix memory leaks bug - v1","user":{"login":"dmsurti","id":4158417,"avatar_url":"https://avatars.githubusercontent.com/u/4158417?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsurti","html_url":"https://github.com/dmsurti","followers_url":"https://api.github.com/users/dmsurti/followers","following_url":"https://api.github.com/users/dmsurti/following{/other_user}","gists_url":"https://api.github.com/users/dmsurti/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsurti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsurti/subscriptions","organizations_url":"https://api.github.com/users/dmsurti/orgs","repos_url":"https://api.github.com/users/dmsurti/repos","events_url":"https://api.github.com/users/dmsurti/events{/privacy}","received_events_url":"https://api.github.com/users/dmsurti/received_events","type":"User","site_admin":false},"body":"This is first of a set of fixes to fix memory leaks. The fixes will be rolled out gradually in different milestones.\r\n\r\nThis removes the reference cycles between Scene, Light Manager, Picker and VTKRenderWindowInteractor. It also invokes closed event handlers when the scene is closed.","created_at":"2015-07-08T08:22:08Z","updated_at":"2015-07-08T10:20:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6231b33ef25e3fe547ad279e517d17c075c8d4a6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/enthought/mayavi/pulls/212/commits","review_comments_url":"https://api.github.com/repos/enthought/mayavi/pulls/212/comments","review_comment_url":"https://api.github.com/repos/enthought/mayavi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/enthought/mayavi/issues/212/comments","statuses_url":"https://api.github.com/repos/enthought/mayavi/statuses/d97a30f56ca329c120ceb60691d809c2f8ce2cee","head":{"label":"dmsurti:fix-memory-leaks-bug","ref":"fix-memory-leaks-bug","sha":"d97a30f56ca329c120ceb60691d809c2f8ce2cee","user":{"login":"dmsurti","id":4158417,"avatar_url":"https://avatars.githubusercontent.com/u/4158417?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsurti","html_url":"https://github.com/dmsurti","followers_url":"https://api.github.com/users/dmsurti/followers","following_url":"https://api.github.com/users/dmsurti/following{/other_user}","gists_url":"https://api.github.com/users/dmsurti/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsurti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsurti/subscriptions","organizations_url":"https://api.github.com/users/dmsurti/orgs","repos_url":"https://api.github.com/users/dmsurti/repos","events_url":"https://api.github.com/users/dmsurti/events{/privacy}","received_events_url":"https://api.github.com/users/dmsurti/received_events","type":"User","site_admin":false},"repo":{"id":14356433,"name":"mayavi","full_name":"dmsurti/mayavi","owner":{"login":"dmsurti","id":4158417,"avatar_url":"https://avatars.githubusercontent.com/u/4158417?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsurti","html_url":"https://github.com/dmsurti","followers_url":"https://api.github.com/users/dmsurti/followers","following_url":"https://api.github.com/users/dmsurti/following{/other_user}","gists_url":"https://api.github.com/users/dmsurti/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsurti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsurti/subscriptions","organizations_url":"https://api.github.com/users/dmsurti/orgs","repos_url":"https://api.github.com/users/dmsurti/repos","events_url":"https://api.github.com/users/dmsurti/events{/privacy}","received_events_url":"https://api.github.com/users/dmsurti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmsurti/mayavi","description":"","fork":true,"url":"https://api.github.com/repos/dmsurti/mayavi","forks_url":"https://api.github.com/repos/dmsurti/mayavi/forks","keys_url":"https://api.github.com/repos/dmsurti/mayavi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmsurti/mayavi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmsurti/mayavi/teams","hooks_url":"https://api.github.com/repos/dmsurti/mayavi/hooks","issue_events_url":"https://api.github.com/repos/dmsurti/mayavi/issues/events{/number}","events_url":"https://api.github.com/repos/dmsurti/mayavi/events","assignees_url":"https://api.github.com/repos/dmsurti/mayavi/assignees{/user}","branches_url":"https://api.github.com/repos/dmsurti/mayavi/branches{/branch}","tags_url":"https://api.github.com/repos/dmsurti/mayavi/tags","blobs_url":"https://api.github.com/repos/dmsurti/mayavi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmsurti/mayavi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmsurti/mayavi/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmsurti/mayavi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmsurti/mayavi/statuses/{sha}","languages_url":"https://api.github.com/repos/dmsurti/mayavi/languages","stargazers_url":"https://api.github.com/repos/dmsurti/mayavi/stargazers","contributors_url":"https://api.github.com/repos/dmsurti/mayavi/contributors","subscribers_url":"https://api.github.com/repos/dmsurti/mayavi/subscribers","subscription_url":"https://api.github.com/repos/dmsurti/mayavi/subscription","commits_url":"https://api.github.com/repos/dmsurti/mayavi/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmsurti/mayavi/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmsurti/mayavi/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmsurti/mayavi/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmsurti/mayavi/contents/{+path}","compare_url":"https://api.github.com/repos/dmsurti/mayavi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmsurti/mayavi/merges","archive_url":"https://api.github.com/repos/dmsurti/mayavi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmsurti/mayavi/downloads","issues_url":"https://api.github.com/repos/dmsurti/mayavi/issues{/number}","pulls_url":"https://api.github.com/repos/dmsurti/mayavi/pulls{/number}","milestones_url":"https://api.github.com/repos/dmsurti/mayavi/milestones{/number}","notifications_url":"https://api.github.com/repos/dmsurti/mayavi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmsurti/mayavi/labels{/name}","releases_url":"https://api.github.com/repos/dmsurti/mayavi/releases{/id}","created_at":"2013-11-13T06:53:32Z","updated_at":"2015-05-06T13:25:52Z","pushed_at":"2015-07-08T08:02:58Z","git_url":"git://github.com/dmsurti/mayavi.git","ssh_url":"git@github.com:dmsurti/mayavi.git","clone_url":"https://github.com/dmsurti/mayavi.git","svn_url":"https://github.com/dmsurti/mayavi","homepage":"","size":77155,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"enthought:master","ref":"master","sha":"72c4ae1780b2509d10f49a181aeed0e6e62f8ad7","user":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"repo":{"id":1288547,"name":"mayavi","full_name":"enthought/mayavi","owner":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enthought/mayavi","description":"","fork":false,"url":"https://api.github.com/repos/enthought/mayavi","forks_url":"https://api.github.com/repos/enthought/mayavi/forks","keys_url":"https://api.github.com/repos/enthought/mayavi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enthought/mayavi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enthought/mayavi/teams","hooks_url":"https://api.github.com/repos/enthought/mayavi/hooks","issue_events_url":"https://api.github.com/repos/enthought/mayavi/issues/events{/number}","events_url":"https://api.github.com/repos/enthought/mayavi/events","assignees_url":"https://api.github.com/repos/enthought/mayavi/assignees{/user}","branches_url":"https://api.github.com/repos/enthought/mayavi/branches{/branch}","tags_url":"https://api.github.com/repos/enthought/mayavi/tags","blobs_url":"https://api.github.com/repos/enthought/mayavi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enthought/mayavi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enthought/mayavi/git/refs{/sha}","trees_url":"https://api.github.com/repos/enthought/mayavi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enthought/mayavi/statuses/{sha}","languages_url":"https://api.github.com/repos/enthought/mayavi/languages","stargazers_url":"https://api.github.com/repos/enthought/mayavi/stargazers","contributors_url":"https://api.github.com/repos/enthought/mayavi/contributors","subscribers_url":"https://api.github.com/repos/enthought/mayavi/subscribers","subscription_url":"https://api.github.com/repos/enthought/mayavi/subscription","commits_url":"https://api.github.com/repos/enthought/mayavi/commits{/sha}","git_commits_url":"https://api.github.com/repos/enthought/mayavi/git/commits{/sha}","comments_url":"https://api.github.com/repos/enthought/mayavi/comments{/number}","issue_comment_url":"https://api.github.com/repos/enthought/mayavi/issues/comments{/number}","contents_url":"https://api.github.com/repos/enthought/mayavi/contents/{+path}","compare_url":"https://api.github.com/repos/enthought/mayavi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enthought/mayavi/merges","archive_url":"https://api.github.com/repos/enthought/mayavi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enthought/mayavi/downloads","issues_url":"https://api.github.com/repos/enthought/mayavi/issues{/number}","pulls_url":"https://api.github.com/repos/enthought/mayavi/pulls{/number}","milestones_url":"https://api.github.com/repos/enthought/mayavi/milestones{/number}","notifications_url":"https://api.github.com/repos/enthought/mayavi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enthought/mayavi/labels{/name}","releases_url":"https://api.github.com/repos/enthought/mayavi/releases{/id}","created_at":"2011-01-24T17:48:00Z","updated_at":"2015-07-07T01:34:11Z","pushed_at":"2015-07-08T08:22:08Z","git_url":"git://github.com/enthought/mayavi.git","ssh_url":"git@github.com:enthought/mayavi.git","clone_url":"https://github.com/enthought/mayavi.git","svn_url":"https://github.com/enthought/mayavi","homepage":"","size":78785,"stargazers_count":182,"watchers_count":182,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":60,"mirror_url":null,"open_issues_count":98,"forks":60,"open_issues":98,"watchers":182,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/212"},"html":{"href":"https://github.com/enthought/mayavi/pull/212"},"issue":{"href":"https://api.github.com/repos/enthought/mayavi/issues/212"},"comments":{"href":"https://api.github.com/repos/enthought/mayavi/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/enthought/mayavi/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/enthought/mayavi/statuses/d97a30f56ca329c120ceb60691d809c2f8ce2cee"}}}}