Summary: [pool] StackObjectPool.releaseObject(...) has silly
behavior when the pool is full
AssignedTo: [hidden email] ReportedBy: [hidden email]
StackObjectPool which is a LIFO pool discards newer pool objects when you call
releaseObject(Object) on a full pool. Presumablly if you are using a
StackObjectPool it is because the most recently added object is the most likely
to be useful when you need another instance.
In the current behavior (1.2) the pool is checked to see if it is maxed out when
you try to release another object back into the pool (line 160). If it is the
recently released object is discarded. Odds are the older objects pushed on to
the pool stack are the most stale and lest useful but those are kept. This
creates a situation where older objects are kept around despite their inferiority.