OpenRA.Mods.Common.Pathfinder.CellInfoLayerPool.ReturnLayer C# (CSharp) Method

ReturnLayer() private method

private ReturnLayer ( CellLayer layer ) : void
layer CellLayer
return void
        void ReturnLayer(CellLayer<CellInfo> layer)
        {
            lock (pool)
               if (pool.Count < MaxPoolSize)
                    pool.Push(layer);
        }

Usage Example

示例#1
0
 public void Dispose()
 {
     if (Layer == null)
     {
         return;
     }
     layerPool.ReturnLayer(Layer);
     Layer     = null;
     layerPool = null;
 }
All Usage Examples Of OpenRA.Mods.Common.Pathfinder.CellInfoLayerPool::ReturnLayer