private author suo
  class PoolCache { /**
     * 对象在Pool中的标识
     */ public sign : string ; /**
     * 允许缓存的最大数量
     */ public maxCount : number = 1000 ; return public getCacheList ( ) { return Pool . getPoolBySign ( this . sign ) ; } param force public tryDispose ( force ) { var list ; list = Pool . getPoolBySign ( this . sign ) ; if ( list . length > this . maxCount ) { list . splice ( this . maxCount , list . length - this . maxCount ) ; } } param sign param maxCount public static addPoolCacheManager ( sign , maxCount = 100 ) { var cache ; cache = new PoolCache ( ) ; cache . sign = sign ; cache . maxCount = maxCount ; CacheManager . regCacheByFunction ( cache . tryDispose , cache . getCacheList ) ; } }