public void Recycle(ref DictionaryCopyable <TKey, TValue> value)
 {
     if (value != null)
     {
         PoolDictionaryCopyable <TKey, TValue> .Recycle(ref value);
     }
 }
Exemple #2
0
 public void Initialize()
 {
     if (this.values == null)
     {
         this.values = PoolDictionaryCopyable <long, float> .Spawn(10);
     }
     if (this.indexes == null)
     {
         this.indexes = PoolHashSetCopyable <int> .Spawn();
     }
 }
 public DataDictionary(int capacity) : this(PoolDictionaryCopyable <TKey, TValue> .Spawn(capacity))
 {
 }
        public void Clone(DictionaryCopyable <TKey, TValue> from, ref DictionaryCopyable <TKey, TValue> to)
        {
            to = PoolDictionaryCopyable <TKey, TValue> .Spawn(from.Count);

            ArrayUtils.Copy(from, ref to);
        }
Exemple #5
0
        public void Dispose()
        {
            PoolDictionaryCopyable <long, float> .Recycle(ref this.values);

            PoolHashSetCopyable <int> .Recycle(ref this.indexes);
        }