Esempio n. 1
0
        public void PreAllocate(int allocationCount)
        {
            for (var i = 0; i < allocationCount; i++)
            {
                var newInstance = ViewHandler.CreateView();
                ViewHandler.SetActiveState(newInstance, false);

                var objectContainer = new ViewObjectContainer(newInstance);
                PooledObjects.Add(objectContainer);
            }
        }
Esempio n. 2
0
 private void OnDeallocateView(ViewObjectContainer x)
 {
     PooledObjects.Remove(x);
     ViewHandler.DestroyView(x.ViewObject);
 }