June 2018
Intermediate to advanced
280 pages
7h 46m
English
The instantiation of objects is one of the most costly operations in terms of performance. While in the past this could have been an issue, nowadays we shouldn't be concerned about it. However, when we deal with objects that encapsulate external resources, such as database connections, the creation of new objects becomes expensive.
The solution is to implement a mechanism that reuses and shares objects that are expensive to create. This solution is called the object pool pattern and it has the following structure:

The classes that are used in the object pool pattern are the following:
Read now
Unlock full access