
7 Dec
2010
7 Dec
'10
11:31 a.m.
I have gone through the object pool documentation, but could not find a clear answer to my doubt.
I want to make a pool of 10 objects. As and when an object need to be created, the pool will be searched for free objects, then the free ones will be chosen. Otherwise it will wait until any of the object is free. Is this possible with object pool?
No, the object_pool is just a type-safe interface for the memory pool, which merely allows you to improve performance when you need to allocate a lot of equally-sized chunks and then to free them all.