Пример #1
0
 public static void Free(RenderObject obj)
 {
     _unusedRenderObjects.Push(obj);
 }
Пример #2
0
 public void Add(RenderObject ro)
 {
     _renderObjects.Add(ro);
 }
Пример #3
0
 public static RenderObject Get()
 {
     RenderObject result;
     if (_unusedRenderObjects.Count <= 0)
     {
         result = new RenderObject();
         _createdRenderObjects.Add(result);
     }
     else
     {
         result = _unusedRenderObjects.Pop();
     }
     return result;
 }