Criticism
Some publications do not recommend using object pooling with certain languages, such as Java, especially for objects that only use memory and hold no external resources. Opponents usually say that object allocation is relatively fast in modern languages with garbage collectors; while the operator new needs only ten instructions, the classic new - delete pair found in pooling designs requires hundreds of them as it does more complex work. Also, most garbage collectors scan "live" object references, and not the memory that these objects use for their content. This means that any number of "dead" objects without references can be discarded with little cost. In contrast, keeping a large number of "live" but unused objects increases the duration of garbage collection. In some cases, programs that use garbage collection instead of directly managing memory may run faster.
Read more about this topic: Object Pool Pattern
Famous quotes containing the word criticism:
“Of all the cants which are canted in this canting worldthough the cant of hypocrites may be the worstthe cant of criticism is the most tormenting!”
—Laurence Sterne (17131768)
“Nothing would improve newspaper criticism so much as the knowledge that it was to be read by men too hardy to acquiesce in the authoritative statement of the reviewer.”
—Richard Holt Hutton (18261897)
“As far as criticism is concerned, we dont resent that unless it is absolutely biased, as it is in most cases.”
—John Vorster (19151983)