Object pool pattern: Difference between revisions

Content deleted Content added
Line 21:
Inadequate resetting of objects may also cause an information leak. If an object contains confidential data (e.g. a user's credit card numbers) that isn't cleared before the object is passed to a new client, a malicious or buggy client may disclose the data to an unauthorized party.
 
If the pool is used by multiple threads, it mustmay haveneed means to prevent parallel threads from grabbing and trying to reuse the same object in parallel. This is is not necessary if the pooled objects are immutable or otherwise multithread - safe.
 
== Critisicm ==