{"action":"created","issue":{"url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23","labels_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23/comments","events_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23/events","html_url":"https://github.com/ntent-ad/kafka4net/issues/23","id":119777633,"number":23,"title":"Memory leak ","user":{"login":"avoxm","id":10351071,"avatar_url":"https://avatars.githubusercontent.com/u/10351071?v=3","gravatar_id":"","url":"https://api.github.com/users/avoxm","html_url":"https://github.com/avoxm","followers_url":"https://api.github.com/users/avoxm/followers","following_url":"https://api.github.com/users/avoxm/following{/other_user}","gists_url":"https://api.github.com/users/avoxm/gists{/gist_id}","starred_url":"https://api.github.com/users/avoxm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avoxm/subscriptions","organizations_url":"https://api.github.com/users/avoxm/orgs","repos_url":"https://api.github.com/users/avoxm/repos","events_url":"https://api.github.com/users/avoxm/events{/privacy}","received_events_url":"https://api.github.com/users/avoxm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-01T18:23:18Z","updated_at":"2015-12-01T21:16:37Z","closed_at":null,"body":"It looks like there is a memory leak. \r\nThe issue is that after sending a big chunk of data kafka4net still keeps a reference to some data that keeps memory from being collected.\r\n\r\nThis is quite easy to reproduce \r\n1. Bulk Send (1 mln probably)\r\n2. Wait till everything is sent\r\n3. Close connection\r\n4. Run GC \r\n5. You will notice that kafka4net still keeps a reference to big amount of memory.\r\n\r\nYou can also run a memory profiler to get more idea."},"comment":{"url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/comments/161098260","html_url":"https://github.com/ntent-ad/kafka4net/issues/23#issuecomment-161098260","issue_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23","id":161098260,"user":{"login":"vchekan","id":106474,"avatar_url":"https://avatars.githubusercontent.com/u/106474?v=3","gravatar_id":"","url":"https://api.github.com/users/vchekan","html_url":"https://github.com/vchekan","followers_url":"https://api.github.com/users/vchekan/followers","following_url":"https://api.github.com/users/vchekan/following{/other_user}","gists_url":"https://api.github.com/users/vchekan/gists{/gist_id}","starred_url":"https://api.github.com/users/vchekan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchekan/subscriptions","organizations_url":"https://api.github.com/users/vchekan/orgs","repos_url":"https://api.github.com/users/vchekan/repos","events_url":"https://api.github.com/users/vchekan/events{/privacy}","received_events_url":"https://api.github.com/users/vchekan/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T21:16:37Z","updated_at":"2015-12-01T21:16:37Z","body":"@avoxm ```It looks like _allPartitionQueues should be set to null in CloseAsync```\r\nI'm not sure how this is possible. If you create and dispose producers, then GC should free producer's memory and thus _allPartitionQueues too. How it's possible that it is not released?"}}