Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Garbage Collection in .NET Framework

tanaka_733
October 26, 2013

Garbage Collection in .NET Framework

プログラミング.NET Framework 第4版 座談会 での発表資料

tanaka_733

October 26, 2013
Tweet

More Decks by tanaka_733

Other Decks in Technology

Transcript

  1. Building a Faster Ruby Garbage Collector Twitterが、Ruby on RailsからJavaVMへ移行する理由 Ruby

    2.1がガベージコレクションを変更,大規模システムでの批 判に対処
  2. System.IDisposable static void Main(string[] args) { FileStream fs = null;

    try { fs = new FileStream("Temp.txt", FileMode.Create); fs.Write(new byte[]{1, 2, 3, 4}, 0 , 4); } finally { if (fs != null) { fs.Dispose(); } } } static void Main(string[] args) { using (var fs = new FileStream("Temp.txt", FileMode.Create)) { fs.Write(new byte[] { 1, 2, 3, 4 }, 0, 4); } }