private ReturnLayer ( CellLayer |
||
layer | CellLayer |
|
return | void |
void ReturnLayer(CellLayer<CellInfo> layer)
{
lock (pool)
if (pool.Count < MaxPoolSize)
pool.Push(layer);
}
public void Dispose() { if (Layer == null) { return; } layerPool.ReturnLayer(Layer); Layer = null; layerPool = null; }