{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/1345","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/1345/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/1345/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/1345/events","html_url":"https://github.com/dotnet/roslyn/pull/1345","id":62543476,"number":1345,"title":"Fix weak reference problem with Document and TextAndVersion","user":{"login":"mattwar","id":3387305,"avatar_url":"https://avatars.githubusercontent.com/u/3387305?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwar","html_url":"https://github.com/mattwar","followers_url":"https://api.github.com/users/mattwar/followers","following_url":"https://api.github.com/users/mattwar/following{/other_user}","gists_url":"https://api.github.com/users/mattwar/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwar/subscriptions","organizations_url":"https://api.github.com/users/mattwar/orgs","repos_url":"https://api.github.com/users/mattwar/repos","events_url":"https://api.github.com/users/mattwar/events{/privacy}","received_events_url":"https://api.github.com/users/mattwar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/cla-not-required","name":"cla-not-required","color":"90EE90"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-17T23:39:02Z","updated_at":"2015-03-18T22:46:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/1345","html_url":"https://github.com/dotnet/roslyn/pull/1345","diff_url":"https://github.com/dotnet/roslyn/pull/1345.diff","patch_url":"https://github.com/dotnet/roslyn/pull/1345.patch"},"body":"Prior to this change references to SourceText obtained from a Document were not keeping the weakly held text (cached, recoverable or not) alive.  This was due to Document implementation holding onto TextAndVersion instance instead of SourceText.\r\n\r\nThis change re-implements RecoverableTextAndVersion to store a recoverable SourceText.\r\n\r\nRecoverableCachedObjectSource was renamed to RecoverableWeakValueSource and moved to utilities because it no longer is tied to caching.  \r\n\r\nAdded CachedWeakValueSource implementation (similar to RecoverableWeakValueSource, but the value is recovered from the initial value source instead of logic in derived class.\r\n\r\nMoved some logic buried in ISyntaxTreeFactorService that caused CreateRecoverableSyntaxTree to return a different kind of tree into a separate method that can be queried before calling CreateRecoverableSyntaxTree because the caller needs to know which type is created because the kind text source supplied depends on the tree type being constructed.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/83216112","html_url":"https://github.com/dotnet/roslyn/pull/1345#issuecomment-83216112","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/1345","id":83216112,"user":{"login":"pharring","id":9952654,"avatar_url":"https://avatars.githubusercontent.com/u/9952654?v=3","gravatar_id":"","url":"https://api.github.com/users/pharring","html_url":"https://github.com/pharring","followers_url":"https://api.github.com/users/pharring/followers","following_url":"https://api.github.com/users/pharring/following{/other_user}","gists_url":"https://api.github.com/users/pharring/gists{/gist_id}","starred_url":"https://api.github.com/users/pharring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pharring/subscriptions","organizations_url":"https://api.github.com/users/pharring/orgs","repos_url":"https://api.github.com/users/pharring/repos","events_url":"https://api.github.com/users/pharring/events{/privacy}","received_events_url":"https://api.github.com/users/pharring/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T22:46:10Z","updated_at":"2015-03-18T22:46:10Z","body":":+1: "}}