Object pool pattern: Difference between revisions

Content deleted Content added
Line 74:
== Examples ==
=== Go ===
resource pool model is a kind of resource advance, resource reuse, suitable for stable business processing mode:
<source lang=Go>
- object resource reuse: the object pool pattern is useful when objects are heavily initialized.
- suitable for stable business: if requirements peak rather than stable requirements, the overhead may outweigh the benefits of object pooling.
- resource advances: since objects are pre-initialized, they have a positive impact on performance.
 
<source lang=Go>
=== Go ===
// package pool
package pool