{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/4492","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/4492/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/4492/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/4492/events","html_url":"https://github.com/dotnet/corefx/pull/4492","id":116751570,"number":4492,"title":"Fixing Issue #4480, ReleaseHandle() getting called more than once due to probable race condition","user":{"login":"rajansingh10","id":13608570,"avatar_url":"https://avatars.githubusercontent.com/u/13608570?v=3","gravatar_id":"","url":"https://api.github.com/users/rajansingh10","html_url":"https://github.com/rajansingh10","followers_url":"https://api.github.com/users/rajansingh10/followers","following_url":"https://api.github.com/users/rajansingh10/following{/other_user}","gists_url":"https://api.github.com/users/rajansingh10/gists{/gist_id}","starred_url":"https://api.github.com/users/rajansingh10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajansingh10/subscriptions","organizations_url":"https://api.github.com/users/rajansingh10/orgs","repos_url":"https://api.github.com/users/rajansingh10/repos","events_url":"https://api.github.com/users/rajansingh10/events{/privacy}","received_events_url":"https://api.github.com/users/rajansingh10/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/2%20-%20In%20Progress","name":"2 - In Progress","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/X-Plat","name":"X-Plat","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-13T11:34:02Z","updated_at":"2015-11-13T15:06:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/4492","html_url":"https://github.com/dotnet/corefx/pull/4492","diff_url":"https://github.com/dotnet/corefx/pull/4492.diff","patch_url":"https://github.com/dotnet/corefx/pull/4492.patch"},"body":"Fix for issue #4480.\r\nLooks like this is happening due to probable race condition which leads to ReleaseHandle() getting called more than once. ReleaseHandle was not setting holding object/pointer to null/Intptr. Setting it explicitly now. \r\n@roncain can you please validate this fix with your test which was crashing earlier."},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/156456278","html_url":"https://github.com/dotnet/corefx/pull/4492#issuecomment-156456278","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/4492","id":156456278,"user":{"login":"davidsh","id":7684835,"avatar_url":"https://avatars.githubusercontent.com/u/7684835?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsh","html_url":"https://github.com/davidsh","followers_url":"https://api.github.com/users/davidsh/followers","following_url":"https://api.github.com/users/davidsh/following{/other_user}","gists_url":"https://api.github.com/users/davidsh/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsh/subscriptions","organizations_url":"https://api.github.com/users/davidsh/orgs","repos_url":"https://api.github.com/users/davidsh/repos","events_url":"https://api.github.com/users/davidsh/events{/privacy}","received_events_url":"https://api.github.com/users/davidsh/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T15:06:51Z","updated_at":"2015-11-13T15:06:51Z","body":">but it won't change anything about ReleaseHandle being invoked twice, which it won't be.\r\n\r\nTotally agree with this part.  The SafeHandle base class is pretty robust and the derived classes' `ReleaseHandle` method will not be called twice."}}