/// <summary> /// 释放Csharp对象池组件; /// </summary> /// <typeparam name="T"></typeparam> /// <param name="type"></param> public void ReleaseCsharpObject <T>(T type) where T : new() { IPool target = type as IPool; if (target != null) { target.OnRelease(); } CsharpObjectPool <T> pool; Object temp; if (_csharpObjectPool.TryGetValue(typeof(T), out temp)) { pool = temp as CsharpObjectPool <T>; } else { pool = CreateCsharpPool <T>(); } pool.Release(type); }