{"action":"closed","issue":{"url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/15","labels_url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/15/comments","events_url":"https://api.github.com/repos/florent37/MaterialViewPager/issues/15/events","html_url":"https://github.com/florent37/MaterialViewPager/issues/15","id":74738456,"number":15,"title":"Memory leak in MaterialViewPagerHelper","user":{"login":"MGaetan89","id":1009664,"avatar_url":"https://avatars.githubusercontent.com/u/1009664?v=3","gravatar_id":"","url":"https://api.github.com/users/MGaetan89","html_url":"https://github.com/MGaetan89","followers_url":"https://api.github.com/users/MGaetan89/followers","following_url":"https://api.github.com/users/MGaetan89/following{/other_user}","gists_url":"https://api.github.com/users/MGaetan89/gists{/gist_id}","starred_url":"https://api.github.com/users/MGaetan89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MGaetan89/subscriptions","organizations_url":"https://api.github.com/users/MGaetan89/orgs","repos_url":"https://api.github.com/users/MGaetan89/repos","events_url":"https://api.github.com/users/MGaetan89/events{/privacy}","received_events_url":"https://api.github.com/users/MGaetan89/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/florent37/MaterialViewPager/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-09T19:17:17Z","updated_at":"2015-05-10T20:18:50Z","closed_at":"2015-05-10T20:18:50Z","body":"I started using https://github.com/square/leakcanary to find potential memory leaks in my application.\r\n\r\nTurns out there is one in your great library in [MaterialViewPagerHelper](https://github.com/florent37/MaterialViewPager/blob/master/materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerHelper.java#L28). Indeed, it holds a static `HashMap` that is never cleared. Maybe you could add a method to clear the content of that map when the `Activity`/`Fragment` is destroyed?"}}