对象池机制有助于减小在堆上进行的分配的数量,因为可以汇聚应用程序中最常见的对象。
Object pooling helps level out the number of allocations made on the heap, since the most common objects in an application can be pooled.
对象池机制可以降低应用程序所需的分配的数量,从而降低应用程序所需的垃圾回收的数量。
Object pooling reduces the number of allocations, and therefore the number of garbage collections, required by an application.
分配接口从堆中分配给定数量的存储器,但具有不同参数和语义。
The allocation interfaces allocate a given amount of storage from the heap, but have different parameters and semantics.
应用推荐