{"action":"created","issue":{"url":"https://api.github.com/repos/Perspex/Perspex/issues/98","labels_url":"https://api.github.com/repos/Perspex/Perspex/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/Perspex/Perspex/issues/98/comments","events_url":"https://api.github.com/repos/Perspex/Perspex/issues/98/events","html_url":"https://github.com/Perspex/Perspex/issues/98","id":104760420,"number":98,"title":"Cache Brush creation under Direct2D","user":{"login":"amerkoleci","id":1788857,"avatar_url":"https://avatars.githubusercontent.com/u/1788857?v=3","gravatar_id":"","url":"https://api.github.com/users/amerkoleci","html_url":"https://github.com/amerkoleci","followers_url":"https://api.github.com/users/amerkoleci/followers","following_url":"https://api.github.com/users/amerkoleci/following{/other_user}","gists_url":"https://api.github.com/users/amerkoleci/gists{/gist_id}","starred_url":"https://api.github.com/users/amerkoleci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amerkoleci/subscriptions","organizations_url":"https://api.github.com/users/amerkoleci/orgs","repos_url":"https://api.github.com/users/amerkoleci/repos","events_url":"https://api.github.com/users/amerkoleci/events{/privacy}","received_events_url":"https://api.github.com/users/amerkoleci/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-03T19:01:27Z","updated_at":"2015-09-07T19:51:39Z","closed_at":null,"body":"At the moment, brushes are created and disposed during drawing using the C# \"using\" pattern, don't know how Direct2D manages creation and dispose of Direct2D resource, would be good to cache brushes per render target and dispose all of them when target or Brush gets disposed."},"comment":{"url":"https://api.github.com/repos/Perspex/Perspex/issues/comments/138368008","html_url":"https://github.com/Perspex/Perspex/issues/98#issuecomment-138368008","issue_url":"https://api.github.com/repos/Perspex/Perspex/issues/98","id":138368008,"user":{"login":"ncarrillo","id":2587725,"avatar_url":"https://avatars.githubusercontent.com/u/2587725?v=3","gravatar_id":"","url":"https://api.github.com/users/ncarrillo","html_url":"https://github.com/ncarrillo","followers_url":"https://api.github.com/users/ncarrillo/followers","following_url":"https://api.github.com/users/ncarrillo/following{/other_user}","gists_url":"https://api.github.com/users/ncarrillo/gists{/gist_id}","starred_url":"https://api.github.com/users/ncarrillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncarrillo/subscriptions","organizations_url":"https://api.github.com/users/ncarrillo/orgs","repos_url":"https://api.github.com/users/ncarrillo/repos","events_url":"https://api.github.com/users/ncarrillo/events{/privacy}","received_events_url":"https://api.github.com/users/ncarrillo/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T19:51:39Z","updated_at":"2015-09-07T19:51:39Z","body":"I've been looking into using a `MemoizingMRUCache` from [Splat](https://github.com/paulcbetts/splat/blob/master/Splat/MemoizingMRUCache.cs) in order to cache `SolidColorBrush` and potentially `LinearGradientBrush`.\r\n\r\nAn article on `MemoizingMRUCache` is [here](http://blog.paulbetts.org/index.php/2010/07/13/reactivexaml-series-using-memoizingmrucache/)."}}