コード例 #1
0
 public CreateObjectAsyncTask(ObjectJar jar, string type, IRecycleProcesser processer, IRecycleFactory factory) : base(false)
 {
     factory.CreateObjectAsync(type, obj =>
     {
         processer.ReclaimObject(obj);
         jar.Drop(obj);
         this.completed = true;
     });
 }
コード例 #2
0
        public IRecyclePool Create(string poolType, IRecycleProcesser processer, IRecycleFactory factory = null)
        {
            RecyclePool pool = null;

            if (!this.pools.TryGetValue(poolType, out pool))
            {
                this.pools.Add(poolType, pool = new RecyclePool(processer, factory));
            }

            return(pool);
        }
コード例 #3
0
 public RecyclePool(IRecycleProcesser processer, IRecycleFactory factory)
 {
     this.processer = processer;
     this.factory   = factory;
 }