{"action":"created","issue":{"url":"https://api.github.com/repos/wildfly/wildfly-core/issues/866","labels_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/866/labels{/name}","comments_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/866/comments","events_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/866/events","html_url":"https://github.com/wildfly/wildfly-core/pull/866","id":93727572,"number":866,"title":"[WFCORE-774] Memory leak in JBoss CLI","user":{"login":"TomasHofman","id":353221,"avatar_url":"https://avatars.githubusercontent.com/u/353221?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasHofman","html_url":"https://github.com/TomasHofman","followers_url":"https://api.github.com/users/TomasHofman/followers","following_url":"https://api.github.com/users/TomasHofman/following{/other_user}","gists_url":"https://api.github.com/users/TomasHofman/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasHofman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasHofman/subscriptions","organizations_url":"https://api.github.com/users/TomasHofman/orgs","repos_url":"https://api.github.com/users/TomasHofman/repos","events_url":"https://api.github.com/users/TomasHofman/events{/privacy}","received_events_url":"https://api.github.com/users/TomasHofman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-08T08:07:00Z","updated_at":"2015-07-08T15:10:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/866","html_url":"https://github.com/wildfly/wildfly-core/pull/866","diff_url":"https://github.com/wildfly/wildfly-core/pull/866.diff","patch_url":"https://github.com/wildfly/wildfly-core/pull/866.patch"},"body":"https://issues.jboss.org/browse/WFCORE-774"},"comment":{"url":"https://api.github.com/repos/wildfly/wildfly-core/issues/comments/119618341","html_url":"https://github.com/wildfly/wildfly-core/pull/866#issuecomment-119618341","issue_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/866","id":119618341,"user":{"login":"TomasHofman","id":353221,"avatar_url":"https://avatars.githubusercontent.com/u/353221?v=3","gravatar_id":"","url":"https://api.github.com/users/TomasHofman","html_url":"https://github.com/TomasHofman","followers_url":"https://api.github.com/users/TomasHofman/followers","following_url":"https://api.github.com/users/TomasHofman/following{/other_user}","gists_url":"https://api.github.com/users/TomasHofman/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasHofman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasHofman/subscriptions","organizations_url":"https://api.github.com/users/TomasHofman/orgs","repos_url":"https://api.github.com/users/TomasHofman/repos","events_url":"https://api.github.com/users/TomasHofman/events{/privacy}","received_events_url":"https://api.github.com/users/TomasHofman/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T15:10:01Z","updated_at":"2015-07-08T15:10:01Z","body":"Well, the only problem there was that every instance of CommandContextImpl added new JaasConfigurationWrapper to global Configuration (so it was creating longer and longer chain). JaasConfigurationWrappers are also holding references back to CommandContextImpl instances, which prevents those from being garbage collected.\r\n\r\nSo I see two options:\r\n1) only add JaasConfigurationWrapper to global Configuration in the first CommandContext instance being created (shouldn't affect the functionality as I believe),\r\n2) or remove JaasConfigurationWrapper from the Configuration in terminateSession() and restore original configuration.\r\n\r\nNeither option is bullet proof, and I thought 1) is simpler."}}