Thursday, July 31, 2014

Dictionary ex

   IDictionary<int, byte[]> meDictionary = new Dictionary<int, byte[]>();
            for (int i = 0; i < 1100; i++)
            {
                var memoryPressure = new byte[1024 * 1024 * 1];
                meDictionary.Add(i, memoryPressure);
            }
            var memoryUsageAtEnd = GC.GetTotalMemory(false);

            //Update
            foreach (KeyValuePair<int, byte[]> pair in meDictionary)
            {
                pair.Value = "";
            }

No comments:

Post a Comment