During runtime, instances of the same type must often be instantiated and unloaded. The initialization process described in the standard cycle is relatively time-consuming and costs valuable CPU time. Optimization is possible by pooling instances that are no longer needed. If an instance of the type already exists in the pool, the iPlus runtime can retrieve the instance from the pool and reuse it. The iPlus runtime takes over the pooling mechanism and the necessary caching for you.
So that the iPlus runtime knows whether your own ACComponent class is poolable, you must overwrite the virtual property IsPoolable in your implementation and return true as the return value.
Disposing phases
If an instance is no longer needed, the first part of the orange highlighted state graph is executed. (DisposingToPool->DisposedToPool).
Recycling phases
If a new instance is required, the iPlusRuntime checks in the pool whether an instance already exists for the type searched for.
- If yes, then it is reprocessed and the second part of the orange colored state graph is cycled through. (RecyclingFromPool->RecycledFromPool->Initialized).
- If not, a new instance is created according to the standard cycle.