タグ

2014年5月18日のブックマーク (2件)

  • The 20 Best Cities On The Planet

    The IESE Business School in Spain is out with its annual Cities in Motion Index (ICIM), which ranks the world’s best ("smartest") cities — those that have the highest levels of innovation, sustainability, and quality of life. This year, Tokyo came in first with its impressive public management, technology, economy, and the ability to attract talent from all over the world. To establish the ranking

    The 20 Best Cities On The Planet
    nezuku
    nezuku 2014/05/18
    どのような調査指標を基に、というのはあるかもしれないけれどあまり自虐的にならずに… でしょうか / 上位の良い点、悪い点、それぞれああー、という感じが。
  • バックグラウンド スレッドで UI 要素を作るとメモリリークする (WPF) | grabacr.nét

    題記の通りなのですが、一時ハマったので共有します。 正確には、「バックグラウンド スレッドで DispatcherObject を作るとメモリリークする」ですね。 例えば、バックグラウンドで画像をダウンロードして加工したり。 もしくは Grid や TextBlock といった UI 要素を使って、サムネイルやら何やらの画像を生成したいときとか。 ImageSource は Freezable なので、バックグラウンドで画像を作って Freeze() してしまえば、UI スレッドに渡してもだいじょうぶ。 なるべく UI スレッドの負担を減らしたいのです。 ということで、以下のようなコードを書いてみます。 サンプルなので Console アプリですが、PresentationCore, PresentationFramework, WindowsBase, System.Xaml あたりを参

    バックグラウンド スレッドで UI 要素を作るとメモリリークする (WPF) | grabacr.nét