Object Pool Pattern - Criticism

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:

    Cubism had been an analysis of the object and an attempt to put it before us in its totality; both as analysis and as synthesis, it was a criticism of appearance. Surrealism transmuted the object, and suddenly a canvas became an apparition: a new figuration, a real transfiguration.
    Octavio Paz (b. 1914)

    The critic lives at second hand. He writes about. The poem, the novel, or the play must be given to him; criticism exists by the grace of other men’s genius. By virtue of style, criticism can itself become literature. But usually this occurs only when the writer is acting as critic of his own work or as outrider to his own poetics, when the criticism of Coleridge is work in progress or that of T.S. Eliot propaganda.
    George Steiner (b. 1929)

    I hold with the old-fashioned criticism that Browning is not really a poet, that he has all the gifts but the one needful and the pearls without the string; rather one should say raw nuggets and rough diamonds.
    Gerard Manley Hopkins (1844–1889)