コード例 #1
0
 internal void CacheSetValue(ReferenceID id, BaseReference value)
 {
     if (m_cacheLookup == null)
     {
         m_cacheLookup = new SegmentedDictionary <ReferenceID, BaseReference>(503, 17, ReferenceIDEqualityComparer.Instance);
     }
     m_cacheLookup[id] = value;
 }
コード例 #2
0
 public sealed override void Dispose()
 {
     m_cacheLookup        = null;
     m_cachePriority      = null;
     m_serializationQueue = null;
     m_pinnedItems        = null;
     base.Dispose();
 }
コード例 #3
0
 internal void PrepareForFlush()
 {
     m_cachePriority.Clear();
     m_cacheLookup        = null;
     m_cacheFreeableBytes = 0L;
     m_pendingFreeBytes   = 0L;
     m_lockedDownForFlush = true;
 }
コード例 #4
0
 internal SegmentedDictionaryEnumerator(SegmentedDictionary <TKey, TValue> dictionary)
 {
     m_dictionary        = dictionary;
     m_version           = dictionary.m_version;
     m_currentValueIndex = -1;
     m_currentPair       = default(KeyValuePair <TKey, TValue>);
     m_context           = null;
     Reset();
 }
コード例 #5
0
 internal void Flush()
 {
     foreach (BaseReference item in m_serializationQueue)
     {
         WriteItem(item);
     }
     m_serializationQueue.Clear();
     m_cachePriority.Clear();
     m_cacheLookup        = null;
     m_cacheCapacityBytes = 0L;
     m_cacheFreeableBytes = 0L;
     m_cacheSizeBytes     = 0L;
     m_storage.Flush();
 }
コード例 #6
0
 public override void Dispose()
 {
     try
     {
         if (m_offsetMap != null)
         {
             m_offsetMap.Close();
             m_offsetMap = null;
         }
         m_cacheLookup      = null;
         m_cachePriority    = null;
         m_staticIdLookup   = null;
         m_staticReferences = null;
     }
     finally
     {
         base.Dispose();
     }
 }
コード例 #7
0
 internal SegmentedDictionaryValuesCollection(SegmentedDictionary <TKey, TValue> dictionary)
 {
     m_dictionary = dictionary;
 }
コード例 #8
0
 internal SegmentedDictionaryValuesEnumerator(SegmentedDictionary <TKey, TValue> dictionary)
 {
     m_dictionary = dictionary;
     m_enumerator = dictionary.GetEnumerator();
 }
コード例 #9
0
 public void Dispose()
 {
     m_context    = null;
     m_dictionary = null;
 }