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:
“The greater the decrease in the social significance of an art form, the sharper the distinction between criticism and enjoyment by the public. The conventional is uncritically enjoyed, and the truly new is criticized with aversion.”
—Walter Benjamin (18921940)
“I, with other Americans, have perhaps unduly resented the stream of criticism of American life ... more particularly have I resented the sneers at Main Street. For I have known that in the cottages that lay behind the street rested the strength of our national character.”
—Herbert Hoover (18741964)
“To be just, that is to say, to justify its existence, criticism should be partial, passionate and political, that is to say, written from an exclusive point of view, but a point of view that opens up the widest horizons.”
—Charles Baudelaire (18211867)