public void Recycle(ref DictionaryCopyable <TKey, TValue> value) { if (value != null) { PoolDictionaryCopyable <TKey, TValue> .Recycle(ref value); } }
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); }
public void Dispose() { PoolDictionaryCopyable <long, float> .Recycle(ref this.values); PoolHashSetCopyable <int> .Recycle(ref this.indexes); }