public static void Free(RenderObject obj) { _unusedRenderObjects.Push(obj); }
public void Add(RenderObject ro) { _renderObjects.Add(ro); }
public static RenderObject Get() { RenderObject result; if (_unusedRenderObjects.Count <= 0) { result = new RenderObject(); _createdRenderObjects.Add(result); } else { result = _unusedRenderObjects.Pop(); } return result; }