public static T Get() { if (instance == null) { instance = new ClassObjPool <T>(); AddInstance(instance); } T local; if (instance.pool.Count > 0) { local = instance.pool.Dequeue(); } else { local = Activator.CreateInstance <T>(); } instance.reqSeq++; local.usingSeq = instance.reqSeq; local.holder = instance; local.OnInit(); return(local); }
static public FOWRevealer Get() { return(ClassObjPool <FOWRevealer> .Get()); }