If your objects are not used with high frequency or do not have a high creation or destruction cost, then object pooling might not be the right strategy.
如果对象的使用频率不高,或者对象的创建或销毁成本不高,则对象池可能不是正确的策略。
This fact combined with the observations drawn above suggests that a contended synchronization is comparable in cost to at least 50 object creations.
把这一事实和我们上面抽取的观察数据结合在一起,可以看出使用一个争用同步的代价至少相当于创建50个对象。
So this object here we could think of as a transport cost.
所以我们用这个标志代表交通成本
应用推荐