예제 #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;
 }