{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1220","labels_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1220/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1220/comments","events_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1220/events","html_url":"https://github.com/libgit2/libgit2sharp/pull/1220","id":114189374,"number":1220,"title":"#1017 Add a finalizer SmartSubtransportRegistration","user":{"login":"rooflz","id":518225,"avatar_url":"https://avatars.githubusercontent.com/u/518225?v=3","gravatar_id":"","url":"https://api.github.com/users/rooflz","html_url":"https://github.com/rooflz","followers_url":"https://api.github.com/users/rooflz/followers","following_url":"https://api.github.com/users/rooflz/following{/other_user}","gists_url":"https://api.github.com/users/rooflz/gists{/gist_id}","starred_url":"https://api.github.com/users/rooflz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rooflz/subscriptions","organizations_url":"https://api.github.com/users/rooflz/orgs","repos_url":"https://api.github.com/users/rooflz/repos","events_url":"https://api.github.com/users/rooflz/events{/privacy}","received_events_url":"https://api.github.com/users/rooflz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-30T02:54:00Z","updated_at":"2015-10-30T10:32:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/1220","html_url":"https://github.com/libgit2/libgit2sharp/pull/1220","diff_url":"https://github.com/libgit2/libgit2sharp/pull/1220.diff","patch_url":"https://github.com/libgit2/libgit2sharp/pull/1220.patch"},"body":"-Implement IDisposable and added finalizer to\r\nSmartSubtransportRegistration\r\n-Updated tests to now call dispose\r\n-Removed CannotUnregisterTwice test, as this test is no longer\r\napplicable after implementing dispose pattern."},"comment":{"url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/comments/152487763","html_url":"https://github.com/libgit2/libgit2sharp/pull/1220#issuecomment-152487763","issue_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/1220","id":152487763,"user":{"login":"nulltoken","id":92363,"avatar_url":"https://avatars.githubusercontent.com/u/92363?v=3","gravatar_id":"","url":"https://api.github.com/users/nulltoken","html_url":"https://github.com/nulltoken","followers_url":"https://api.github.com/users/nulltoken/followers","following_url":"https://api.github.com/users/nulltoken/following{/other_user}","gists_url":"https://api.github.com/users/nulltoken/gists{/gist_id}","starred_url":"https://api.github.com/users/nulltoken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nulltoken/subscriptions","organizations_url":"https://api.github.com/users/nulltoken/orgs","repos_url":"https://api.github.com/users/nulltoken/repos","events_url":"https://api.github.com/users/nulltoken/events{/privacy}","received_events_url":"https://api.github.com/users/nulltoken/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T10:32:11Z","updated_at":"2015-10-30T10:32:11Z","body":"Another approach would be to mimic what's has been done for `OdbBackend`.\r\n\r\n - Make the `Free` method **[test](https://github.com/libgit2/libgit2sharp/blob/vNext/LibGit2Sharp/OdbBackend.cs#L580-L606)** if the type is `IDisposable`. When that's the case, invoke the `Dispose()` method. This would allow the user to derive from the core type, and implement `IDisposable` by himself/herself when requiring some cleanup.\r\n - This would require the core type to not be sealed any longer (@ethomson any potential drawback here?)\r\n\r\nSee this **[unit test](https://github.com/libgit2/libgit2sharp/blob/vNext/LibGit2Sharp/OdbBackend.cs#L580-L606)** that asserts this feature."}}