Table of Contents

Class DictWithLife<TKey, TValue>

Namespace
GameCanvas
Assembly
GameCanvas.dll

期限付き辞書

public sealed class DictWithLife<TKey, TValue> where TKey : IEquatable<TKey> where TValue : class, new()

Type Parameters

TKey
TValue
Inheritance
DictWithLife<TKey, TValue>
Inherited Members

Constructors

DictWithLife(int, int)

public DictWithLife(int capacity = 8, int initialSize = 0)

Parameters

capacity int
initialSize int

Methods

DecrementLife()

public void DecrementLife()

Issue(in TKey, out TValue, in byte)

public void Issue(in TKey key, out TValue value, in byte life = 3)

Parameters

key TKey
value TValue
life byte

ReleaseAll()

public void ReleaseAll()

TryGetValue(in TKey, out TValue)

public bool TryGetValue(in TKey key, out TValue value)

Parameters

key TKey
value TValue

Returns

bool